I have two commit hashes and want to list all the tags that begin with phinx-
between these two commit hashes. How can I do it?
Edit:
This is what I have come up with. Is there a better solution
git log --pretty=format:'%D' 35164f33..49085fbe | grep -o 'tag: phinx-[0-9]*'
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
git log -p command displays the patch representing each commit.
To see the changes between two commits, you can use git diff ID1.. ID2 , where ID1 and ID2 identify the two commits you're interested in, and the connector .. is a pair of dots. For example, git diff abc123.. def456 shows the differences between the commits abc123 and def456 , while git diff HEAD~1..
Find Latest Git Tag Available In order to find the latest Git tag available on your repository, you have to use the “git describe” command with the “–tags” option. This way, you will be presented with the tag that is associated with the latest commit of your current checked out branch.
A quick hack could be:
git log --oneline --decorate <sha1>..<sha1>|grep "tag:"| grep "phinx-"
An actual solution might be more complex and involve git rev-list
.
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