I would like to list the available tags in Magit in order to diff a specific revision, is this possible?

Specifically what I am after is to list the revision history at a certain tag and then view the diff for one of the patches in its history. I have just completed a rebase and noticed some inconsistencies, I know which patch introduced the change and I would like to see its diff from the version prior to the rebase.

  • 2
    Not a very robust way, but will work for the lack of better options: : tag - : will execute git with the given argument and git tag will just print the list of all tags. – wvxvw Jan 21 '15 at 8:54
up vote 11 down vote accepted

Specifically what I am after is to list the revision history at a certain tag

It sounds like you already know the tag you need, in which case:

Magit 1.x:
lrl type tag name (with TAB completion) RETRET

Magit 2.x:
lo type tag name (with TAB completion) RET

I have just completed a rebase and noticed some inconsistencies

Or use the reflog to find the pre-rebase hash:

Magit 1.x:
lrh

Magit 2.x:
lORET

I would like to list the available tags in Magit ...

Since v2.1.0 you can type y to show a buffer which lists branches, remote branches, and, at the bottom, tags.

The command is magit-refs-mode. It replaces the "branch manager" and "wazzup" buffers from older releases.

...in order to diff a specific revision

I just noticed, this doesn't work. In a future release it will. In that buffer press d d while point is on a tag, to show the diff for the tagged commit.

Alternatively type d r <tagname> RET anywhere in a Magit buffer. This doesn't offer tags for completion, but here too a future release probably will.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.