git push origin --delete branch_nameWhat I use this for: some of my repositories have enough branches on them, but I don't want to delete them locally.
#git
git push origin --delete branch_nameWhat I use this for: some of my repositories have enough branches on them, but I don't want to delete them locally.
#git
Notes on using git so I don't have to use a search engine every time.
#git
In most cases, I want to undo the commit and leave everything intact, so I can re-do the commit message or (un)set my name or e-mail:
git reset --soft HEAD^I can see a use for undoing the commit and unstaging the changes.
git reset HEAD^I seldom want to throw out everything and reset to the previous commit:
git reset --hard HEAD^The above is described in...
git reset --helpIt even includes readily understandable examples.