Re: [git-users] git revision number
From: guru prasad gupr1...@gmail.com Now my question is if the project version is 1.2.3.4 Git doesn't record version numbers of any sort. So you have to store the version number(s) in one or more files, so that the program that creates the archive file can extract the version number(s) and to the correct thing with them. There are probably many ways of doing this. Dale -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Git revision number
On Fri, Nov 18, 2011 at 07:11, PJ Weisberg p...@irregularexpressions.net wrote: I'm looking for something in Git analogous to the revision numbers in Subversion. Pretty much exactly what you get from `git describe', but I don't want it to be dependent on any tags or refs. Is there any way to get something like that out of Git? You really should use SHA-1 references if you want to refer to some point in history and you don't want to use tags. However, if you want something similar to subversion revision numbers, this should get pretty close to subversion semantics: echo r$(git log --date-order --oneline --all | wc -l) Example output is r1090. Drop the --all flag if you want revision number for the current branch only. However, there is not an easy way to map from such revision number back to corresponding history revision. Git uses SHA-1 references for a reason. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Git revision number
On Nov 17, 2011, at 9:11 PM, PJ Weisberg p...@irregularexpressions.net wrote: I'm looking for something in Git analogous to the revision numbers in Subversion. Pretty much exactly what you get from `git describe', but I don't want it to be dependent on any tags or refs. Is there any way to get something like that out of Git? -PJ git rev-parse HEAD -- David (mobile) -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.