Re: How we use Git
Mark Côté <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.bugzilla.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2014-10-31 7:26 AM, Gervase Markham wrote: > A quick quiz: > > Q1: What git commands would I use to obtain an exact copy of 4.4.6 from > our git repo? > > Q2: Same question for 4.4.4. > > As far as I can see, the only way of doing this currently is to do: > > git clone http://git.mozilla.org/bugzilla/bugzilla.git > cd bugzilla > git log > <look for the final 4.4.4 commit> > git checkout <sha1> > <get strange message about "detached HEAD"> > > Am I wrong? Almost. You would do up to 'cd bugzilla', then git checkout bugzilla-4.4.6 'bugzilla-4.4.6' is a tag on the last commit included in the release. We create similar tags for all releases. Yes, you will then often get a message about a detached head. What that means is that you are no longer on the head (very latest commit) of a particular branch; you've gone back in time. That's fine, but it means you can't push anything up to git.mozilla.org without creating a new branch--which is the correct behaviour, since the detached-head message means there are commits done in that branch after this tag was made, and you don't want to change history. I would imagine you wouldn't be interested in creating new commits if you were looking to go back to 4.4.6's exact last commit anyway. Regarding Randall's message, we could branch for every release; indeed, given git's very light-weight approach to branches, there are many strategies for developing under git. However, given our relatively small change volume, I don't think it's worth the extra overhead, at the moment at least. Let me know if anything is still unclear. Btw, for anyone still confused about git, I *highly* recommend the book Pro Git, which is available for free at http://git-scm.com/book/. It's pretty much essential to understand the model behind git to do anything beyond the basics, and that book will definitely help you (I felt much more knowledgeable after just the first few chapters). Mark _______________________________________________ dev-apps-bugzilla mailing list dev-apps-bugzilla-CzyLcWPZiU5YsZ3hbOqMTti2O/[email protected] https://lists.mozilla.org/listinfo/dev-apps-bugzilla - To view or change your list settings, click here: <http://bugzilla.org/cgi-bin/mj_wwwusr?user=gcbd-developers-Uylq5CNFT+jYtjvyW6yDsg@public.gmane.org>