Adrija
Adrija

Reputation: 99

Removing one file from a Pull request in github

Accidentally, I have committed one specific (additional) file in my Pull Request which shouldn't be there. I tried git fetch and then git checkout -- file but its giving me a patherror. So I switched to master and created a new branch with git checkout -b newbranch but still its showing me the same. Can someone please help?

Upvotes: 1

Views: 92

Answers (1)

VonC
VonC

Reputation: 1324238

The simplest approach is:

  • checkout your PR branch (that you already have pushed)
  • delete (git rm) the extra file
  • push

That will update the existing PR, and the file will no longer be visible.

Upvotes: 1

Related Questions