Git

From Useful Things
Revision as of 22:09, 29 January 2015 by Milosivanovic (talk | contribs)
Jump to: navigation, search

Undo last commit and KEEP changes

git reset --soft HEAD~1

Undo last commit and LOSE changes

git reset --hard HEAD~1

List all remote branches

git ls-remote --heads <remote-name>

where remote-name is usually something like origin