All of lore.kernel.org
 help / color / mirror / Atom feed
From: martinvz <martin.von.zweigbergk@gmail.com>
To: git@vger.kernel.org
Subject: Re: Difference between pull --rebase and fetch+rebase
Date: Thu, 7 Jan 2010 15:38:05 -0800 (PST)	[thread overview]
Message-ID: <1262907485376-4269422.post@n2.nabble.com> (raw)
In-Reply-To: <adf1fd3d1001071433j6cd36641sdd2dfd6a936d8483@mail.gmail.com>



Santi Béjar-2 wrote:
> 
> Is your upstream branch rebased?
> 

Sorry, but I'm not sure I understand what that means. Most of the commits in
the upstream branch (the remote main branch) were rebased onto that branch
at some point in time before being pushed to our shared repository. The
remote branch itself was never rebased against any other branch (all
destructive operations disallowed in Gitosis). I hope that (possibly along
with the information below) answers your question.


Santi Béjar-2 wrote:
> 
> Can you provide, at least, a graph of your history (ala git log
> --graph --oneline for example)? And plot also the reflog entries and
> all the important commits.
> 

$ git log --graph --format=%h --all
* 2038a46 # topic-2
* a7b93b2
* f2501ae # origin/main
* cd5aaa9
* cb232f3
...
* 5ed0d06
* 3067862
| * 6eba2fa # topic-1
| * b09aaf4
| * bc3b72a
|/
| * 03d0d84 # topic-3
| * 5160773
| * 3c25642
|/
| * 6e9b12b # topic-4
| * 75f5ab2
| * bdd08ce
| * b5d5759
|/
* 486b580
* a021696
* 3ffe7df
* d0f55c5
...

I have topic-1 checked out and run "git pull" and expect it to rebase (only)
commits bc3b72a, b09aaf4, 6eba2fa onto f2501ae, but it starts by applying
a021696 and 486b580.

$ git reflog -g origin/main
f2501ae refs/remotes/origin/mai\x7f\x7fn@{0}: fetch origin: fast forward
3ffe7df refs/remotes/origin/mai\x7f\x7fn@{1}: fetch origin: fast forward
...

I hope that's all that's all you need. It seems that the problem is that the
oldremoteref gets overwritten with the entry from the reflog. Is the problem
that 3ffe7df appears in the reflog or that 486b580 doesn't appear there? I'm
not clear on what ends up in the reflog.

I just realized that I myself created a021696 and 486b580 (but not 3ffe7df),
probably by rebasing some now-dead branch against origin/main.

Something else that may or may not have something to do with the problem is
that there is also a branch called origin/main-stable (pointing to the same
commit as origin/main). I also have a local main branch (also same commit as
origin/main). I don't know if any of this could confuse Git. (To be
perfectly honest, it is actually the origin/main-stable branch I'm trying to
pull from, just in case you think the branch name could have any impact.)


Thanks,
Martin

-- 
View this message in context: http://n2.nabble.com/Difference-between-pull-rebase-and-fetch-rebase-tp4266164p4269422.html
Sent from the git mailing list archive at Nabble.com.

  reply	other threads:[~2010-01-07 23:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 12:23 Difference between pull --rebase and fetch+rebase martinvz
2010-01-07 12:58 ` martinvz
2010-01-07 16:00 ` Santi Béjar
2010-01-07 18:44   ` martinvz
2010-01-07 22:33     ` Santi Béjar
2010-01-07 23:38       ` martinvz [this message]
2010-01-08 11:05         ` Santi Béjar
2010-01-08 19:41           ` martinvz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262907485376-4269422.post@n2.nabble.com \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.