From: Santi Béjar Date: Tue, 15 Apr 2008 12:01:06 GMT Subject: Re: [new tool] git-project-version.sh Message-ID: <8aa486160804150501p2f55a3e9g33df94c1d4274e48@mail.gmail.com> In-Reply-To: <20080415113629.GA17459@denkbrett.schottelius.org> On Tue, Apr 15, 2008 at 1:36 PM, Nico -telmich- Schottelius wrote: > Hello! > > As I want to use the latest commit id in all my projects, so I know > which commit the version is based on, I wrote an extremly simple script > that is based on git-show to display only the version named > git-project-version.sh. an equivalent simpler version is: git rev-parse [--short] HEAD Also "git show" is a porcelain command, that means it is for humans, not for scripts. The output of "git show" can change while the output of "git rev-parse" (and the plumbing) is stable. But maybe what you really want is: git describe [--always] Santi