Summary of Git Commands

From PeformIQ Upgrade
Revision as of 19:00, 1 April 2012 by PeterHarding (talk | contribs)
Jump to navigation Jump to search

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

  • git stash
  • git checkout xxx
  • ...
  • git commit -a -m "xxx"
  • git stash apply
  • ...