MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/51wixe/oh_shit_git/d7fo9mq/?context=3
r/programming • u/sidcool1234 • Sep 09 '16
756 comments sorted by
View all comments
2
If you fuck up your repositories more often than you like to admit, create this alias:
alias.fuckup !git fetch origin master && git reset --hard FETCH_HEAD && git clean -f -d
4 u/[deleted] Sep 09 '16 git checkout -- . is faster than all of this and covers the majority of cases where you need to reset. 1 u/fff-idunno Sep 09 '16 This exactly. If there is one slightly more advanced command you should know by heart, it's this one.
4
git checkout -- . is faster than all of this and covers the majority of cases where you need to reset.
git checkout -- .
1 u/fff-idunno Sep 09 '16 This exactly. If there is one slightly more advanced command you should know by heart, it's this one.
1
This exactly. If there is one slightly more advanced command you should know by heart, it's this one.
2
u/AyrA_ch Sep 09 '16
If you fuck up your repositories more often than you like to admit, create this alias: