Skip to content

Instantly share code, notes, and snippets.

@half2me
Created July 25, 2018 11:17
Show Gist options
  • Select an option

  • Save half2me/211d1d6b30a074479d181440af56c31f to your computer and use it in GitHub Desktop.

Select an option

Save half2me/211d1d6b30a074479d181440af56c31f to your computer and use it in GitHub Desktop.
Remove file from PR
git checkout pr-branch
git reset origin/master -- /path/to/file
git commit
git checkout -- . # or git reset --hard @
git push
@trackger
Copy link
Copy Markdown

This was very helpful!

@kdeng00
Copy link
Copy Markdown

kdeng00 commented Aug 20, 2020

Saved me from reading the git docs

@half2me
Copy link
Copy Markdown
Author

half2me commented Aug 21, 2020

Saved me from reading the git docs

lol, was worth the effort then :P

@a2f0
Copy link
Copy Markdown

a2f0 commented Apr 29, 2022

Champion class git going on here. ✅

@CourtneyDocs
Copy link
Copy Markdown

Damn, this is the way. Thank you, years later.

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