How to use git

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use git

Till Paala
Hi translators,

I just got annoyed by this superflous merge commit with the message
"Merge branch 'lilypond/translation' of
ssh://git.sv.gnu.org/srv/git/lilypond into lilypond/translation"
that git does me almost all the time. How to pull correctly so this
wouldn't occur anymore?

Sometimes ago I thought this was solved and I didn't get this kind of
commits anymore, but now they have reappeared and it seems everybody
else did understand the clou about it :-)

Thanks
Till



Reply | Threaded
Open this post in threaded view
|

Re: How to use git

Francisco Vila
2010/11/6 Till Paala <[hidden email]>:
> Hi translators,
>
> I just got annoyed by this superflous merge commit with the message
> "Merge branch 'lilypond/translation' of
> ssh://git.sv.gnu.org/srv/git/lilypond into lilypond/translation"
> that git does me almost all the time.

What exactly is "almost all the time"?  Once for every commit you try to make?

> How to pull correctly so this wouldn't
> occur anymore?

If you want, we could compare our configs, I don't have that message.

> Sometimes ago I thought this was solved and I didn't get this kind of
> commits anymore, but now they have reappeared and it seems everybody else
> did understand the clou about it :-)

No, I don't understand it.

--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: How to use git

Till Paala
In reply to this post by Till Paala
Am 08.11.10 00:49, schrieb Valentin Villenave:

> On Sat, Nov 6, 2010 at 11:25 PM, Till Paala<[hidden email]>  wrote:
>> I just got annoyed by this superflous merge commit with the message
>> "Merge branch 'lilypond/translation' of
>> ssh://git.sv.gnu.org/srv/git/lilypond into lilypond/translation"
>> that git does me almost all the time. How to pull correctly so this wouldn't
>> occur anymore?
> I suspect it's perfectly normal. If others have been making changes
> since the last time you've pulled, whenever you'll try and push a
> commit it will have to merge your branch with the remote translation
> branch in its current state.
>
> My advice: before doing any modifications, always do git pull origin
> lilypond/translation
> This way you'll work with source code that is perfectly up-to-date,
> and hopefully nobody will push another commit before you push your own
> modifications. (If it does happen though, then git will just ask you
> to pull again so that every changes get merged together.)
Ok, this seems to be the explanation: I normally pull and do a long diff
with check-translation which I go through over the next week or so, then
I push all my collected patches, and often git asks me to pull before,
that is where this merge than appears and the merge commit gets created.
I was remembering this could be avoided using git pull -r, but since
this seems to conflict with the translation status check in some
configurations I was somehow reluctant to using it.
So if everybody can live with these "not necessary" commits than I will
continue as before.
>> Sometimes ago I thought this was solved and I didn't get this kind of
>> commits anymore, but now they have reappeared and it seems everybody else
>> did understand the clou about it :-)
> Well, unless I'm mistaken and we're talking about something totally
> different than what I think it is, again, I think this is normal.
]:)
> Hope this helps!
> Valentin.
>



Reply | Threaded
Open this post in threaded view
|

Re: How to use git

Till Paala
In reply to this post by Francisco Vila
Am 07.11.10 19:07, schrieb Francisco Vila:

> 2010/11/6 Till Paala<[hidden email]>:
>> Hi translators,
>>
>> I just got annoyed by this superflous merge commit with the message
>> "Merge branch 'lilypond/translation' of
>> ssh://git.sv.gnu.org/srv/git/lilypond into lilypond/translation"
>> that git does me almost all the time.
> What exactly is "almost all the time"?  Once for every commit you try to make?
>
>> How to pull correctly so this wouldn't
>> occur anymore?
> If you want, we could compare our configs, I don't have that message.
never mind, Valentin explained it. I meant the message from a commit
that merges my tree when I have done updates and pulled on top of them.

Till
>
>



Reply | Threaded
Open this post in threaded view
|

Re: How to use git

Francisco Vila
2010/11/10 Till Paala <[hidden email]>:

> Am 07.11.10 19:07, schrieb Francisco Vila:
>>
>> 2010/11/6 Till Paala<[hidden email]>:
>>>
>>> Hi translators,
>>>
>>> I just got annoyed by this superflous merge commit with the message
>>> "Merge branch 'lilypond/translation' of
>>> ssh://git.sv.gnu.org/srv/git/lilypond into lilypond/translation"
>>> that git does me almost all the time.
>>
>> What exactly is "almost all the time"?  Once for every commit you try to
>> make?
>>
>>> How to pull correctly so this wouldn't
>>> occur anymore?
>>
>> If you want, we could compare our configs, I don't have that message.
>
> never mind, Valentin explained it. I meant the message from a commit that
> merges my tree when I have done updates and pulled on top of them.

Right, then.  This is what I do to avoid any unwanted merge: try
pushing as soon as possible after a pull.  Do not pull a day, make
changes for some days, then push. You can understand that many things
could happen in the meantime on origin.

If the pull can't fast-forward my tree, and for any reason I can not /
do not know how to push a clean commit, a last resort trick is git
format-patch <my first commit>.  Then reset to a version which you are
sure it is on origin.  A quick look at

  http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/lilypond/translation

usually helps.  Do 'git log' frequently and compare your output with
the one from that page.

Once you are sure that your history matches that of origin, apply with
'git am' the patches you made before, then push.

I know these are somewhat personal tips and tricks, not optimal or
professional enough, but they work.  I am open (and thankful) to
suggestion for improvements to this.

--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


Reply | Threaded
Open this post in threaded view
|

Re: How to use git

Till Paala
Am 10.11.10 16:44, schrieb Francisco Vila:
> 2010/11/10 Till Paala<[hidden email]>:
>> never mind, Valentin explained it. I meant the message from a commit that
>> merges my tree when I have done updates and pulled on top of them.
> Right, then.  This is what I do to avoid any unwanted merge: try
> pushing as soon as possible after a pull.  Do not pull a day, make
> changes for some days, then push. You can understand that many things
> could happen in the meantime on origin.
Yes, this is reasonable, fortunately I didn't have much manual merges,
my tree is normally ok, it's just in a different state than origin

> If the pull can't fast-forward my tree, and for any reason I can not /
> do not know how to push a clean commit, a last resort trick is git
> format-patch<my first commit>.  Then reset to a version which you are
> sure it is on origin.  A quick look at
>
>    http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/lilypond/translation
>
> usually helps.  Do 'git log' frequently and compare your output with
> the one from that page.
>
> Once you are sure that your history matches that of origin, apply with
> 'git am' the patches you made before, then push.
>
> I know these are somewhat personal tips and tricks, not optimal or
> professional enough, but they work.  I am open (and thankful) to
> suggestion for improvements to this.
>
Yeah, have just been to lazy up to now to do it this style; after all
isn't git meant to work that way: everybody does their stuff locally and
reconnects and commits the changes when he is done.
But I will see if I can develop a work flow with doing patches and
applying them on top.

Till



Reply | Threaded
Open this post in threaded view
|

Re: How to use git

Francisco Vila
2010/11/10 Till Paala <[hidden email]>:

> Yeah, have just been to lazy up to now to do it this style; after all isn't
> git meant to work that way: everybody does their stuff locally and
> reconnects and commits the changes when he is done.

Yes, but a clean history for everyone else is also desirable.

I can guess the development of the linux kernel, for example, where
there are hundredths of people sending commits at the same time, could
well be a chaos if git didn't cope with this.  Fortunately, the most
common situation is not many people working on the same lines of the
same files at the same time.

> But I will see if I can develop a work flow with doing patches and applying
> them on top.

Note that I proposed that as a last resort only, not recommending it in general.

--
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com