From: alexandrul Date: Sun, 18 Oct 2009 18:16:23 GMT Subject: Re: Creating something like increasing revision numbers Message-ID: <4ADB5B77.8040605@gmail.com> In-Reply-To: <200910181923.19511.johan@herland.net> Johan Herland wrote: > Yes. You can create the 'initial' tag with > > git rev-list HEAD | tail -n1 | xargs git tag initial > > and from then on > > git describe --tags --match initial | cut -d'-' -f2 > > will give you the increasing "revision" number you're looking for. Just be > aware that if you have two parallel branches with the same number of > commits, they will give you the same number. I.e. this only works for a > single, stable (i.e. no history rewrites), branch of development. So if you concatenate the branch name with the "revision" number you would have pretty unique tags repo-wide, if you won't rename your branches.