troubles with Git: pull and push

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

troubles with Git: pull and push

Federico Bruni-2
Can you please remind me the process of pulling and pushing for translators?

I've just ended up in this situation:

$ git status
# On branch translation
# Your branch and 'origin/translation' have diverged,
# and have 1 and 5 different commits each, respectively.
#
nothing to commit (working directory clean)

How did I get there?
Before pushing my last commit, I run 'git pull' (without rebasing),
which forced me to merge my local branch with the remote branch. I was
not sure about this merge so I reset hard to my last commit.

IIRC, rebasing is not recommended for translators.

I have the attached patch to push.
How should I do now?

Thanks in advance
--
Federico

0001-Doc-it-update-learning-notation-usage-and-website.patch (54K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: troubles with Git: pull and push

David Kastrup
Federico Bruni <[hidden email]> writes:

> Can you please remind me the process of pulling and pushing for translators?
>
> I've just ended up in this situation:
>
> $ git status
> # On branch translation
> # Your branch and 'origin/translation' have diverged,
> # and have 1 and 5 different commits each, respectively.
> #
> nothing to commit (working directory clean)
>
> How did I get there?
> Before pushing my last commit, I run 'git pull' (without rebasing),
> which forced me to merge my local branch with the remote branch. I was
> not sure about this merge so I reset hard to my last commit.
>
> IIRC, rebasing is not recommended for translators.

Rebasing your local work on top of the remote translation is fine and
actually correct.  You just should not rebase master on translation or
vice versa.

--
David Kastrup


Reply | Threaded
Open this post in threaded view
|

Re: troubles with Git: pull and push

Federico Bruni-2
Il 13/12/2012 21:34, David Kastrup ha scritto:
>> IIRC, rebasing is not recommended for translators.
> Rebasing your local work on top of the remote translation is fine and
> actually correct.  You just should not rebase master on translation or
> vice versa.

git pull -r
worked fine

I read in the manual that git-rebase, if nothing is specified, will
rebase the current branch on top of the upstream configured in the
remote and merge options for that branch, that is:

[branch "translation"]
        remote = origin
        merge = refs/heads/translation

 From now on I'll use 'git pull -r' before pushing.

I'm not sure why rebasing is not recommended for translators:
http://lilypond.org/doc/v2.17/Documentation/contributor/pulling-and-rebasing

Maybe it's about using new committishes not yet pushed to the repository
(as explained in the note -- see above link). This is never the case for me.