Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] GIT layout

Of course you can have multiple branches pointing to the same commit. You could even just before merging back into master give the bug branch a second branch name. Say you're on branch bug/444444 and find that it also fixes bug 444445. Then, just before merging, while still on branch bug/444444 you can say "git branch bug/444445". Then "git checkout master" and "git merge bug/444444" and "git merge bug/444445" where the latter should give you some message saying that there's nothing to do because the commit of that branch has already been merged.

But we could of course be less strict with ourselves and use this just as an optional convention. We can always use commit messages to point our which bugs some commit actually fixes.

I don't care so much about the "strict" part but find it vastly useful to be able to have an easy branch-per-bug facility where I can progress the bug fix together with other committers with no need to send patches through Bugzilla. That would probably only have to be the last step before merging into master. So in order to get another committer's +1, one would create the patch ("git diff --no-prefix master" while on the bug/nnn branch), attach to the bugzilla and then merge the branch once the patch was +1'ed.

-- Axel

On 06/06/2011 10:35 PM, Ed Willink wrote:

That makes sense and works for a simple bug fix.

I often find that one bug fix leads to another and so a simple bug/nnn
doesn't work. Any solution.


On 06/06/2011 21:20, Axel Uhl wrote:
Ed, Adolfo,

either one of you or even both can/should now +1

as explained in

As suggested in I
would find it useful if after successful setup of our new git
repository we'd stick to a convention of opening branches for bugs
named bug/nnn with nnn being the bug number. Given how easy it is with
git to branch and merge, I really suggest we stick to this convention
for each bug fix, if possible. I think it will make our work much more

-- Axel

_______________________________________________ mailing list

Back to the top