Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] A couple of git questions regarding tags



On 10/26/2011 01:23 PM, Jerry Feldman wrote:
> I've been tagging my commits, and now I want to use that in my code. The
> 'git describe' command does this nicely:
> In my sandbox I get '1.0.3-1-gf9a4796', but if I push (actually pull)
> that into another repository I get '1.0.3'.
> I would like to be able to display the version as well as the commit so
> if someone points out a bug I know exactly. The describe in my sandbox
> gives me pretty much what I want, and so does the 1.0.3. But I would
> prefer the commit number (9a4796). Certainly I can parse the log to get
> the current commit number.
>
> The second question is that I would like a script that will do a git
> commit as well as update the tag. I can either write this myself in
> bash, tcl or python, or find a script out there that already does it.
>
One additional related question. Suppose the running code is
uncommitted, how easy is it to determine if the code has been committed.
This is probably more of a rhetorical issue since the only time this
would happen is in my sandbox, but I've had a couple of times where I've
forgotten to commit.

All the above can be accomplished fairly easily in a bash or tcl script.
I'm just looking to get some additional tools that might be hanging around.

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id:3BC1EB90 
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66  C0AF 7CEA 30FC 3BC1 EB90




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org