Git Everyday Guide

  • git-init[1] to create a new repository.
  • git-show-branch[1] to see where you are.
  • git-log[1] to see what happened.
  • git-checkout[1] and git-branch[1] to switch branches.
  • git-add[1] to manage the index file.
  • git-diff[1] and git-status[1] to see what you are in the middle of doing.
  • git-commit[1] to advance the current branch.
  • git-reset[1] and git-checkout[1] (with pathname parameters) to undo changes.
  • git-merge[1] to merge between local branches.
  • git-rebase[1] to maintain topic branches.
  • git-tag[1] to mark known point.


Use a tarball as a starting point for a new repository.

$ tar zxf frotz.tar.gz
$ cd frotz
$ git init
$ git add . (1)
$ git commit -m "import of frotz source tree."
$ git tag v2.43 (2)

add everything under the current directory.

make a lightweight, unannotated tag.