[Plone-conference] A tip about working with git at sprints

Domen Kožar domen at dev.si
Sat Oct 13 23:49:48 UTC 2012


I have alias for pull setup in global git config file to do it by default.
And when there is a lot to rebase, I'll just pull it to temporary branch
and merge it.

On Sun, Oct 14, 2012 at 1:40 AM, Maurits van Rees <
m.van.rees at zestsoftware.nl> wrote:

> Op 14-10-12 01:29, David Glick schreef:
>
>  In thanks for your gittips, here is a "git tip" for you:
>> When we have sprints and lots of people are working on the same package
>> at once, the git commit log tends to get cluttered with lots of merge
>> commits that look like "Merge branch 'master' into ploneconf2012". This
>> happens because while you were making your commit, someone else already
>> pushed a new one to github, so when you pull git makes a new commit to
>> merge the two changes.
>>
>> Instead of doing "git pull," you can do "git pull --rebase". This will
>> make git redo your commit(s) after the one(s) that happened on github, so
>> that no additional merge commit is necessary unless something conflicts.
>>
>
> Ah, I have not used that one yet.  Should work nicely, thanks.  I usually
> do interactive rebases.
>
> In case you have already done a normal git pull and you have ended up in
> the situation David mentions, you can also do `git rebase -i HEAD^^` to
> interactively rebase the last two commits (or more, if you add more
> carets).  If you have not done this before, you may want to first make a
> quick copy or tarball of your clone, just to be safe.
>
> If this scares you (it should not), then ask a fellow sprinter to assist
> you.  It should not take long.
>
> If it still scares you, simply do what you have done until now: do a git
> pull and push your changes without worrying about all this. Getting your
> fixes committed and pushed upstream is more important than how the commit
> message looks.  But: it is a worthwhile skill to have.
>
>
> --
> Maurits van Rees: http://maurits.vanrees.org/
> Zest Software: http://zestsoftware.nl
>
>
> ______________________________**_________________
> Plone-conference mailing list
> Plone-conference at lists.plone.**org <Plone-conference at lists.plone.org>
> http://lists.plone.org/**mailman/listinfo/plone-**conference<http://lists.plone.org/mailman/listinfo/plone-conference>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-conference/attachments/20121014/516221f2/attachment.html>


More information about the Plone-conference mailing list