Re: [git-users] git revision number
On Tue, 28 Oct 2014 17:49:55 -0700 (PDT) guru prasad wrote: [...] > Now my question is if the project version is 1.2.3.4 > > then I can put this 1.2.3.4 in the archive version so I can see it on > the runtime but I also want to be able to correlate the version of > the config file. The config file has Dev, QA, QA perf, PRD > > Now when I deploy I want to be able to deploy with 1.2.3.4:1.2 (1.2 > being the version of Dev config file) something like this. > > Am I completely off track? Not sure how to individual keep track of > the 4 config files in the config project folder so that I can deploy > dev changes separately with dev version number, QA with QA number > etc., It's not really clear what exactly do you want to achieve. You can't have Git somehow automatically use/track/modify/apply those version numbers because Git does not know anything about them. But I suppose you can leverage Git in one way or another to help you maintaining these version numbers. What comes to my mind is: 1) Have two special files in your repository: one containing the project version and another containing the config version. Make the archive generation tool read them but not include them into the archive it generates. Normally, these files should be empty or contain some template values, like "A.B.C.D" and "X.Y" respectively, then, during the release cycle of a particular S/W revision, the branch tracking this would receive two technical commits: one populating the app version file and another one populating the file with configuration version. 2) Use tags of special format understood by the archive generation tool. Again, during the release cycle of your software product, once the devs release their code, tag it using something like "app-v1.2.3.4". Then, when another set of changes is done to prepare a particular configuration tag the resulting commit with something like "conf-v1.2". When generating the archive, use git describe --tags --match 'app-v*' to obtain the nearest "application version" tag, then git describe --tags --match 'conf-v*' to obtain the nearest "config version" tag, parse out version numbers from then and construct the resulting version. You can then tag with a combined tag, say, simply "v1.2.3.4:1.2" to be able to easily locate this version afterwards when a support request comes in. 3) Just use branches named after version numbers. Say, when you're about to start a release cycle of a particular version of your software, fork a branch named "v1.2.3.4" off the point the dev team blessed as ready for release. When you need to apply certain configuration to it, fork another branch off "v1.2.3.4" and name it "v1.2.3.4:1.2". I'm not sure I fully understood your requirements but at least all that might fuel your imagination. -- 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
> From: guru prasad > 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.
[git-users] git revision number
I will try my best to explain the scenario Root folder has 7 projects, from what I have read about GIT, it will create a snapshot of the 7 projects each time there is a revision. the way our projects work is that we create a deployable archive file. At this point this archive file is not configured. We then have a config prop file that has environment related information. Then archive file is modified based on the env detail and then deployed to DEV, QA, PROD etc., Our tooling has a capability to put a version number on the archive so we can co-relate it to the original version. Now my question is if the project version is 1.2.3.4 then I can put this 1.2.3.4 in the archive version so I can see it on the runtime but I also want to be able to correlate the version of the config file. The config file has Dev, QA, QA perf, PRD Now when I deploy I want to be able to deploy with 1.2.3.4:1.2 (1.2 being the version of Dev config file) something like this. Am I completely off track? Not sure how to individual keep track of the 4 config files in the config project folder so that I can deploy dev changes separately with dev version number, QA with QA number etc., I hope I haven't confused to you all but figuring this out would greatly help make progress with GIT. Thanks in advance. -- 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 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 Fri, 18 Nov 2011 12:20:03 -0800 PJ Weisberg 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? > > git rev-parse HEAD > > a019c73ec854f45119c6e907571c04ac7f6b8885 > 7718a7ec90a8fa78334254ddbf9d0d9d82f7d31d > 7f785f315845907e926cddb8aa4b831b4348e19b > e1e448fd7f24eccc8eac8bc533a9edd04fa966dc > > Which of these is most recent? > > The more I think about it, though, the more I think I could probably > get away with using a timestamp for what I had in mind. I'm curious about what do you have in mind; could you please explain? This is interesting, because the property of revision identifiers in Subversion being ordered in time is a by-product of them being implemented as an ever-increasing per-repository integer number. Instead, in DVCS systems, each commit (think of revision) explicitly links to its parent commit(s) and so tools like `git log` or `gitk` have no problems of ordering the commits "along the time axis". Hence it appears you might be solving a problem which does not really exist. -- 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 Thu, Nov 17, 2011 at 10:19 PM, David Aguilar wrote: > On Nov 17, 2011, at 9:11 PM, PJ Weisberg > 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 a019c73ec854f45119c6e907571c04ac7f6b8885 7718a7ec90a8fa78334254ddbf9d0d9d82f7d31d 7f785f315845907e926cddb8aa4b831b4348e19b e1e448fd7f24eccc8eac8bc533a9edd04fa966dc Which of these is most recent? The more I think about it, though, the more I think I could probably get away with using a timestamp for what I had in mind. -PJ -- 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 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.
[git-users] Git "revision number"
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 -- 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.