Wednesday, 27 June 2012

A visual Git reference

A brief, visual reference for the most common commands in git.

The four commands between the working directory, the stage (also called the index), and the history (in the form of commits).

•git add files copies files (at their current state) to the stage.
•git commit saves a snapshot of the stage as a commit.
•git reset -- files unstages files; that is, it copies files from the latest commit to the stage. Use this command to "undo" a git add files. You can also git reset to unstage everything.
•git checkout -- files copies files from the stage to the working directory. Use this to throw away local changes.
Ref:-http://marklodato.github.com/visual-git-guide/index-en.html

No comments:

Post a Comment