Skip to content

Instantly share code, notes, and snippets.

@searls
Created August 29, 2013 11:15
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save searls/6376808 to your computer and use it in GitHub Desktop.
a handy way to unpull a pull that bit off more than you could chew.
#!/bin/bash
git reset --hard HEAD@{1}
@searls
Copy link
Author

searls commented Aug 29, 2013

  1. git pull
  2. You think "UGH I don't want to deal with all these changes right now"
  3. git unpull
  4. ❤️

@gaffneyc
Copy link

Alternatively I think you could set up an alias named unpull

git config --global alias.unpull "reset --hard HEAD@{1}"

@searls
Copy link
Author

searls commented Aug 29, 2013

👍

@0xD7ba952CE8A0976e8d9852b7649bf01c30146

So did you just forget you made this? https://twitter.com/searls/status/1259080072218046465

@searls
Copy link
Author

searls commented May 10, 2020

LOL, I completely forgot I made this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment