Difference between revisions of "Summary of Git Commands"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) |
PeterHarding (talk | contribs) |
||
Line 1: | Line 1: | ||
=Working with Branches= | =Working with Branches= | ||
See http://gitref.org/branches/ | |||
* git branch | * git branch | ||
Line 7: | Line 9: | ||
=Reviewing Remotes= | =Reviewing Remotes= | ||
See http://gitref.org/remotes/ | |||
* git remote show origin | * git remote show origin | ||
* git ls-remote --heads origin | * git ls-remote --heads origin | ||
==Grab one and use it== | |||
* git fetch xxx | |||
* git checkout xxx | |||
* got branch | |||
=Stashes= | |||
* git stash | |||
* git checkout xxx | |||
* ... | |||
* git commit -a -m "xxx" | |||
* git stash apply | |||
* ... | |||
Revision as of 19:59, 1 April 2012
Working with Branches
See http://gitref.org/branches/
- git branch
- git branch -a
- git branch -r
Reviewing Remotes
See http://gitref.org/remotes/
- git remote show origin
- git ls-remote --heads origin
Grab one and use it
- git fetch xxx
- git checkout xxx
- got branch
Stashes
- git stash
- git checkout xxx
- ...
- git commit -a -m "xxx"
- git stash apply
- ...