Git Cheat Sheets
- "Hithub Cheat Sheets": http://help.github.com/git-cheat-sheets/
- "Diagram": http://byte.kde.org/~zrusin/git/git-cheat-sheet-medium.png
- "Interactive Page for Commands Workflow": http://ndpsoftware.com/git-cheatsheet.html#loc=local_repo;
- "List of Commands & Tips": http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_grey.pdf
Enable GIT colors commands
- git config --global color.diff auto
- git config --global color.status auto
- git config --global color.branch auto
- git config color.interactive auto
- Or, you can set all of them on with the color.ui option:
- git config color.ui true
Creating & pushing new branch
- First, you must create your branch locally
- git checkout -b your_branch
- push the branch to the remote repository origin and tracks it
- git push -u origin your_branch
listing all files in a commit:
$ git show --pretty="format:" --name-only bd61ad98
Restoring a deleted file in a Git repo:
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
No comments:
Post a Comment