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

Anatoly Bubenkov bubenkoff at gmail.com
Sun Oct 14 01:19:56 UTC 2012


you rock, thanks

On Sunday, October 14, 2012, Domen Kožar wrote:

> git config --global branch.autosetuprebase always
>
> On Sun, Oct 14, 2012 at 2:04 AM, Mikko Ohtamaa <mikko at opensourcehacker.com<javascript:_e({}, 'cvml', 'mikko at opensourcehacker.com');>
> > wrote:
>
>>
>>
>> On Sun, Oct 14, 2012 at 2:49 AM, Domen Kožar <domen at dev.si<javascript:_e({}, 'cvml', 'domen at dev.si');>
>> > wrote:
>>
>>> 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.
>>
>>
>> Can you please share how you do this?
>>
>>
>>>
>>>
>>> On Sun, Oct 14, 2012 at 1:40 AM, Maurits van Rees <
>>> m.van.rees at zestsoftware.nl <javascript:_e({}, 'cvml',
>>> '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 <javascript:_e({}, 'cvml',
>>>> 'Plone-conference at lists.plone.org');>
>>>> http://lists.plone.org/**mailman/listinfo/plone-**conference<http://lists.plone.org/mailman/listinfo/plone-conference>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Plone-conference mailing list
>>> Plone-conference at lists.plone.org <javascript:_e({}, 'cvml',
>>> 'Plone-conference at lists.plone.org');>
>>> http://lists.plone.org/mailman/listinfo/plone-conference
>>>
>>>
>>
>>
>> --
>> Mikko Ohtamaa
>> http://opensourcehacker.com
>> http://twitter.com/moo9000
>>
>>
>

-- 
Anatoly Bubenkov
+380(66)6358527
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-conference/attachments/20121014/4bde1e73/attachment.html>


More information about the Plone-conference mailing list