Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git diff with remote tag

Tags:

git

diff

tags

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:

  1. origin
  2. 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.

like image 910
aspyct Avatar asked Oct 29 '13 15:10

aspyct


People also ask

How do I list a remote tag?

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 run git diff?

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 is git diff not showing?

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


1 Answers

I use git ls-remote --tags proposal |grep tagged_idea to get the revision hash, then do git diff with the hash.

like image 132
Pluto Avatar answered Sep 29 '22 20:09

Pluto