Home Blog CV Projects Patterns Notes Book Colophon Search

Git Reset

28 Nov, 2016

When you've got yourself in a mess with a git rebase, it is handy to be able to just throw everything away and start again. Here's what I learned today for doing just that:

git rebase --abort
git reset --hard HEAD~20
git stash
git pull --rebase upstream master

Don't run those commands unless you want to throw away what you've done and sync with upstream master again.

Copyright James Gardner 1996-2020 All Rights Reserved. Admin.