简体   繁体   中英

How do you compare file of current branch with file in given commit in VsCode?

I'm working on a project on a given branch in VSCode, and want to compare my current file with the contents of the same file in a previous commit on a different branch. I think I can do this with the diff command, but I want to do it visually in VSCode. Does anyone know how to do this?

I'm not really sure you can do that by default with VSCode. Or I don't know to do that too.
Currently, I use Git History extensions to do that.
I go to look on diff file, and click on Git History button on top and select the branch and commit where I want to diff with current file.

您可以使用GitLensGit历史记录

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM