vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Easily revert deleted files during PR reviews

Open jonny-harte opened this issue 2 years ago • 4 comments

When reviewing a Pull Request in VSCode I often find files that have been deleted by mistake and need to undone/restored. At the moment the only way I can find to do so is to create a new file with the same name in the same location and then copy the content from the diff view back into the file and commit and push to undo the change in the PR.

Is there a better way to do this or can a revert option be added when right clicking on the file in the Changes in Pull Request view?

jonny-harte avatar Nov 28 '23 06:11 jonny-harte

There is currently no way to do this, but it makes sense as a feature request!

alexr00 avatar Nov 29 '23 13:11 alexr00

Thanks @alexr00 for confirming! Yes please, I think this would be a great thing to add as at the moment its quite time consuming to undo file deletes during a review

jonny-harte avatar Nov 30 '23 04:11 jonny-harte

I think it should just be 'revert changes to file' instead of 'restore deleted file'. Effectively they're the same, but first one is more broad. I've found myself opening diff of files and copying old file to new one, but it would be nice to select multiple files and click revert.

nxy7 avatar Aug 08 '24 07:08 nxy7