Version Control Software
Useful Commands:
git status Lists the modified / staged files at a certain time.
git diff Lets you see the difference between files modified and their last commits
git add <filename> Stages a file and gets it ready to be committed
git commit Commits all files that are staged
git reset HEAD <filename> Unstages a file
git checkout <filename> Resets a file to the last commit
git branch <branch name> Creates new local branch
git checkout <branch name> Switches you to another branch
git push origin <local branch>:<remote branch> Pushes your local commits to remote branch
git pull origin <remote branch> Pulls in from remote branch (this will not work if you have local commits that are not pushed)
git pull --rebase origin <remote branch> Pulls in from remote branch, adding your local commits on top of it
git rebase -i HEAD~<number> Allows squashing, deleting, etc. of multiple commits. <number> denotes the number of commits you want to see
git log Gets list of commits
gitk Graphical view of history of commits
--
AlbertWu - 15 Jul 2010
Topic revision: r1 - 15 Jul 2010 - 21:36:54 -
AlbertWu