How to remove files from the pull request?

Actually made to vanish in some commits to the files should not have been polite. How to remove them from the pull request?
June 10th 19 at 16:10
3 answers
June 10th 19 at 16:12
Usually in your branch to do the commit with amend - to change the last comment. Ie to delete files or revertall. git add..., git commit-a and push with force git push -f
We should notice that the force-push is a sign of bad taste and slozhnosostavnyh problems when Mariah when the branch employs more than one person. Can refer to the quotes of Linus Torvalds for this reason. - Daphnee_Medhurst8 commented on June 10th 19 at 16:15
I treat him as a tool. If in the limb that no longer works, I correct typos, which have no historical value, there is nothing bad I can not see. If there are 2+ person, of course, doing a force push is not worth it - Jonathan.Abbott45 commented on June 10th 19 at 16:18
June 10th 19 at 16:14
If it is about PR - you can just make a new commit with the removal of these files (git rm somefile), and then make a squash (to glue together a number of commits into one, about it can be read separately) for branches with this PR, make a separate branch where everything is merged into a single commit where these files will no longer be in the history, and the old branch to delete and push the delete (git push --delete origin some_branch_to_remove).
June 10th 19 at 16:16
Usually it's very simple.
If the history of the commits you are not worried about +/- one commit, then this can be solved by simply adding another commit. In this commit, delete those same files (should be done in the same thread which was sent to the PR).

If you supesite changes in the branch. You will see that a commit is automatically pulled into the PR.

Find more questions by tags GitHubGit