letmaik / vscode-git-tree-compare

🎄 VS Code extension for comparing the git working tree against a branch, tag, or commit, displayed as folder tree
https://marketplace.visualstudio.com/items?itemName=letmaik.git-tree-compare
MIT License
60 stars 7 forks source link

Feature Request - Add little "Reset Button to Main/Master/XXX" helper buttons next to each file #90

Closed tnrich closed 1 year ago

tnrich commented 1 year ago

Hi there, again thanks for the great extension, I use it all the time!

One thing that would make it even better would be if you could add helper buttons next to the files a la the built in vscode diff view:

image

Right now there is only an open file button. In particular I think there should be a button to "Reset File to Master" next to each file: image

Thanks!

letmaik commented 1 year ago

What is the git command you would run on the command line to revert a file to a given base ref? How would you deal with path renames?

tgreen7 commented 1 year ago

git checkout origin/master [filename] will revert file changes. This wouldn't handle renames though.

tnrich commented 1 year ago

Wow @letmaik that was quick 🙏🤙🥴

letmaik commented 1 year ago

I went ahead and implemented this in #91. It wasn't hard but there are a bunch of special cases to deal with. I pushed out a new release, let me know if you see any issues that should be fixed.

tnrich commented 1 year ago

Working awesome so far @letmaik ! Really appreciate it!

tnrich commented 11 months ago

@letmaik thanks again for this little change. I can't believe how helpful vscode-git-tree-compare is in my day to day workflow of tracking down how a PR broke tests.. so simple and so effective! 🙏