From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jonas Thiem <jonas@thiem.email>
Cc: git@vger.kernel.org
Subject: Re: Question about rebasing - unexpected result, can't figure out why
Date: Tue, 13 Feb 2018 00:36:25 +0000 [thread overview]
Message-ID: <20180213003624.GC1022467@genre.crustytoothpaste.net> (raw)
In-Reply-To: <44e87a5a-b2be-f3f5-ac98-6831e056152d@thiem.email>
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]
On Sat, Feb 10, 2018 at 09:47:57PM +0100, Jonas Thiem wrote:
> == Why did I expect that ==
>
> Of course after the client rebase, C3.txt should be gone (since it's
> gone at the original last commit of the client branch).
>
> But since it still exists in the server branch at the final commit,
> after rebasing & reapplying that onto the master, shouldn't it be put
> back in? Also, I would expect C3 -> C4 -> C10 as the complete chain of
> commits of the remaining server branch to be attached at the end, not
> just C4 -> C10...
>
> Does git somehow detect C3 would be applied twice? Doesn't the commit
> hash of C3 change after it is rebased? So how exactly would it figure
> that out? I'm really unsure about what is going on.
Yes. The git rebase documentation says, "Note that any commits in HEAD
which introduce the same textual changes as a commit in HEAD..<upstream>
are omitted (i.e., a patch already accepted upstream with a different
commit message or timestamp will be skipped)."
If you want to be very explicit about replaying these commits, you can
say "git rebase --onto master $(git merge-base master HEAD)", in which
case C3 will be replayed.
--
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]
prev parent reply other threads:[~2018-02-13 0:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-10 20:47 Question about rebasing - unexpected result, can't figure out why Jonas Thiem
2018-02-13 0:36 ` brian m. carlson [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180213003624.GC1022467@genre.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=jonas@thiem.email \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).