Difference between revisions of "Summary of Git Commands"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) |
PeterHarding (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Also see - [[Git Notes]] | [[Git SCM Notes]] | [[Getting Started with Git]] | |||
=Working with Branches= | =Working with Branches= | ||
Line 24: | Line 25: | ||
=Stashes= | =Stashes= | ||
* git stash | See - http://book.git-scm.com/4_stashing.html | ||
* git checkout | |||
A quick aside - need to do something on 'yyy': | |||
* git stash save "wip for xxx" | |||
* git checkout yyy | |||
* ... | * ... | ||
* git commit -a -m " | * git commit -a -m "xyzzy" | ||
Get back to what I was working on... | |||
* git stash apply | * git stash apply | ||
* ... | * ... | ||
Queuing up stashes... | |||
* git stash list | |||
* git stash apply stash@{1} | |||
Also see - [[Git Notes]] | [[Git SCM Notes]] | [[Getting Started with Git]] | |||
[[Category:Git]] | [[Category:Git]] | ||
[[Category:SCM]] | |||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:Software Tools]] | [[Category:Software Tools]] |
Latest revision as of 02:57, 13 June 2014
Also see - Git Notes | Git SCM Notes | Getting Started with Git
Working with Branches
See http://gitref.org/branching/
- 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
See - http://book.git-scm.com/4_stashing.html
A quick aside - need to do something on 'yyy':
- git stash save "wip for xxx"
- git checkout yyy
- ...
- git commit -a -m "xyzzy"
Get back to what I was working on...
- git stash apply
- ...
Queuing up stashes...
- git stash list
- git stash apply stash@{1}
Also see - Git Notes | Git SCM Notes | Getting Started with Git