I'm about to merge a big change from a remote branch (non-origin), and more specifically from a given tag.
There are two remotes then:
origin
proposal
On the proposal
remote, a branch name idea
exists, with a tag tagged_idea
.
The idea is that I want to review the incoming changes between tagged_idea
and my current HEAD. How can I achieve this?
I tried something like git diff .../proposal/tags/tagged_idea
but it didn't work well. Any idea?
In other terms, what I would like to see is the result of the merge, before even doing it in my branch. Just like if I did the pull git pull proposal tags/tagged_idea
but without actually making the changes.
In order to list remote Git tags, you have to use the “git ls-remote” command with the “–tags” option and the name of your remote repository.
How Do I Find the Difference Between Two Branches? For comparing two branches in Git, you simply run git diff <source-branch-name>.. <destination-branch-name> . Of course, you can replace the current branch name with HEAD.
Why do you get no git diff output before adding? Git does not treat files in the filesystem as automatically included in the version control system. You have to add things explicitly into the Git repository (as you are doing by adding the current directory with git add . ).
I use git ls-remote --tags proposal |grep tagged_idea
to get the revision hash, then do git diff
with the hash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With