Erez
Erez

Reputation: 6446

Git - find revision with tag that start with

I want to do format-patch between the last revision that has a tag that start with "Sync_" and the HEAD

Something like:

git format-patch Sync_*...HEAD

Is there a way to do that?

Upvotes: 2

Views: 46

Answers (1)

Guildenstern
Guildenstern

Reputation: 3841

git format-patch $(git describe --no-abbrev --match='Sync_*')...HEAD

This finds the first reachable annotated tag with this pattern (glob) from HEAD.

Upvotes: 0

Related Questions