git suicide:

git() { if [[ $@ == 'suicide' ]]; then git reset --hard origin/master; git push origin master --force; fi }

  • 5
    > And to your left you can see an excellent example over engineering
  • 2
    I am little confused here, what are you pushing after a hard reset? The hard reset takes your repo to the head of origin/master, so there shouldn't be any changes left in the local repo to push to origin/master, right?
Add Comment