Git: Support to compare with arbitrary commit instead of the current HEAD
See original GitHub issueCurrently numerous places (explorer, gutters, etc.) will display changes since the last commit. I believe it would be useful to allow to show the same annotations but related to a different branch or tag. I am currently working on a large pull request and find myself constantly running git diff master
in a console.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:31
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Comparing commits - GitHub Docs
Comparisons across commits. You can compare a single commit in Git to the commit's predecessors using two types of notation. Notation, Meaning, Example ......
Read more >git-diff Documentation - Git
You can use HEAD to compare it with the latest commit, or a branch name to compare with the ... This is to...
Read more >How to compare two different commits on the same branch in ...
You can use the following URL structure to compare commits in the same branch: github.com/<username>/<repo_name>/compare/<commit1>.
Read more >Compare commits in Git revision log
But I'm wondering if there's any way to compare two arbitrary commits in that view. I know I can use the Git ⇒...
Read more >Ubuntu Manpage: git-diff - Show changes between commits ...
Typically you would want comparison with the latest commit, so if you do not give <commit>, it defaults to HEAD. If HEAD does...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! I’ve requested the same feature in #61610, where I was pointed at this one. So happy to know that I’m not alone!
Providing my feature request below.
VS Code highlights changed lines against head branch, just like any other IDE does. This means that you can see only uncommitted edits.
I am typically working on a feature for several days. At the end of every day I need to commit my work in order to report my progress and back it up.
After I commit, I no longer see edits that I’m introducing with the given feature.
I want changed lines to stay highlighted even after I commit. This could be achieved by letting users select a branch to compare against (head by default).
As a workaround, I’m using GitLens feature
Compare Ancestry with Working Tree
against the dev branch. This works, but it is a very elaborate action, and it shows results in a separate window. I want changes to be highlighted inline as I work on files.Thank you for your attention. 🙇
Is there any update on this feature?