question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git: Support to compare with arbitrary commit instead of the current HEAD

See original GitHub issue

Currently 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:open
  • Created 6 years ago
  • Reactions:31
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
lolmauscommented, Oct 23, 2018

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. 🙇

2reactions
morningmonicommented, Nov 29, 2022

Is there any update on this feature?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found