Re: git and rebasing
- From: Owen Taylor <otaylor redhat com>
- To: Simos <simos lists googlemail com>
- Cc: Gnome-infrastructure gnome org
- Subject: Re: git and rebasing
- Date: Thu, 09 Apr 2009 10:21:59 -0400
On Thu, 2009-04-09 at 00:55 +0100, Simos wrote:
> Hi All,
>
> In my latest push to gtk+, I noticed that I had a "Merge branch
> 'master' of ssh://simos git gnome org/git/gtk+" in the commit message.
> URL is
> http://git.gnome.org/cgit/gtk+/
> http://git.gnome.org/cgit/gtk+/commit/?id=fbbbf7a936f891dfc0d7f0e4b78aeefe972d6825
>
> Obviously, this happened because I committed my change before pulling.
> I suspect that this will be quite common once the translation teams
> start using git.
> I'ld like to figure out the best way to address the issue.
>
> Shall we instruct people to always
> $ git --rebase pull
> before they
> $ git push
To a good approximation 'git pull' is *never* right when pulling from
git.gnome.org. Everybody - developers, translators, etc, always should
'git pull --rebase'.
The default behavior of 'git pull' is really designed for the case where
multiple cooperating developers are merging changes from each other.
I'm wondering if I should put a pre-update hook into place that looks
for merge commits containing the text:...
Merge branch 'master' of ssh://
Since that pretty much always means someone did a 'git pull' and got an
extraneous merge commit.
> Obviously these two commands are not a single atomic operation, so
> there are always chances to get a merge branch.
If someone else commits in between, a push won't be allowed (not a fast
forward.) Repeating 'git pull --rebase' will fix.
- Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]