这次我们看一些实例
Use a tarball as a starting point for a new repository.
$ tar zxf frotz.tar.gz
$ cd frotz
$ git init
$ git add . //添加所有文件到index
$ git commit -m "import of frotz source tree."
$ git tag v2.43Create a topic branch and develop.
$ git checkout -b alsa-audio (1)
$ edit/compile/test
$ git checkout -- curses/ux_audio_oss.c (2)
$ git add curses/ux_audio_alsa.c (3)
$ edit/compile/test
$ git diff HEAD (4)
$ git commit -a -s (5)
$ edit/compile/test
$ git reset --soft HEAD^ (6)
$ edit/compile/test
$ git diff ORIG_HEAD (7)
$ git commit -a -c ORIG_HEAD (8)
$ git checkout master (9)
$ git merge alsa-audio (10)
$ git log --since='3 days ago' (11)
$ git log v2.43.. curses/ (12)