Take the 2-minute tour ×

I have make pull request on git (with "xcodeproj/project.pbxproj" file - my fault), so can I delete this file from created Pull Request? Thanks..

share|improve this question

2 Answers 2

up vote 5 down vote accepted
  • Make a commit that deletes this file and push it.
  • Go to your fork's Github page and click Pull Request again. You will get a message stating that you already have a pull request, and that you can adjust the commit range for it.
  • Include your new commit (with the deletion).

The offending file will still be in the changesets to be merged, mind you, so if it contains sensitive data it's best to close the pull request and wipe out the file from your fork's repository first. Github help describes how to do that.

share|improve this answer
I would prefers @nulltoken solution because Xion one leaves the error visible in the history. It's not like if you were correcting a bug and you want to keep track of it. You submitted a file by error, so it should be removed from history, even if it does not contain sensitive data. –  Fabien Quatravaux Jan 29 '13 at 8:47

Another solution would be to

  • Locally rewrite your commit(s) by removing the file, using amend or rebase git features
  • Force push your branch toward your GitHub repository

This will update the pull request by only displaying your refreshed commit(s).

share|improve this answer
This solution is better because the history is clean. The deleted file will not appear anymore : the mistake will not be visible at all. –  Fabien Quatravaux Jan 29 '13 at 8:44

Your Answer


