git - Remove a modified file from pull request - Stack Overflow

PHOTO EMBED

Thu Oct 13 2022 07:13:22 GMT+0000 (Coordinated Universal Time)

Saved by @eneki

//Switch to the branch from which you created the pull request:

git checkout pull-request-branch

// Overwrite the modified file(s) with the file in another branch, let's consider it's master:

git checkout origin/master -- file_path_from_project_root_folder

// Commit and push it to the remote:

git commit -m "Removed a modified file from pull request"
git push origin pull-request-branch

content_copyCOPY

https://stackoverflow.com/questions/39459467/remove-a-modified-file-from-pull-request