After creating branch Y from working branch X, I deleted some files to reduce visual noise by not seeing those files around on the file system, while working on branch Y. These files are being changed in branch X.
Here is the scenario:
A - B [origin/master] \ C - D - G - H [origin/X] \ E - F [Y] Changes from branch Y are also pushed to origin/Y.
I already raised a pull request (PR) on branch Y for review.
How can I rewrite the commit history in origin/Y to get a file back?
Yis already on PR request on latest commit. Is this query not different from attached?git push -f origin Y. After you have force-pushed the branch, the PR should update on github or bitbucket.parent of the commit that deleted the filesayid1. What isid of the previous commitin step 2 below? I have more than one file deleted afterid1git checkout <rev-id> -- <deleted-filepath>command.