From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Robert Pluim <rpluim@gmail.com>,
Lars Ingebrigtsen <larsi@gnus.org>,
emacs-devel@gnu.org
Subject: Re: master bdda935 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Mon, 17 Aug 2020 16:31:52 -0400 [thread overview]
Message-ID: <jwvlfid81gy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <871rk5t4vn.fsf@igel.home> (Andreas Schwab's message of "Mon, 17 Aug 2020 22:05:32 +0200")
>>>> Doesn't Git offer some way to *merge* (not rebase) but with the branches swapped?
>>> A merge always uses HEAD as the first parent, so if you want to swap,
>>> swap HEAD.
>> How can I do that in a way that as seamless as `git merge`?
> You just need to make sure HEAD points to the commit you want as the
> first parent.
No, I want the following:
- I'm in a Git worktree with HEAD pointing at some local change of mine.
- I do `git ..magical..merge..`
- Now I'm in a worktree where HEAD was merged with the upstream branch
and the upstream branch (rather than HEAD) is the first branch.
Technically within Git it's a small matter of the order in which the
parents are listed in the commit. The question is how to get Git to do
it using the available command line API.
I know several ways to do that, but none of them are as seamless as `git
merge` w.r.t things like execution time, treatment of non-committed changes,
or the set of files whose mtime is affected.
Stefan
next prev parent reply other threads:[~2020-08-17 20:31 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200816182558.16607.52991@vcs0.savannah.gnu.org>
[not found] ` <20200816182601.16F2A209AC@vcs0.savannah.gnu.org>
2020-08-16 18:34 ` master bdda935 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs Lars Ingebrigtsen
2020-08-16 19:03 ` Eli Zaretskii
2020-08-16 19:13 ` Lars Ingebrigtsen
2020-08-17 14:15 ` Robert Pluim
2020-08-17 14:57 ` Stefan Monnier
2020-08-17 15:37 ` Robert Pluim
2020-08-17 16:58 ` Eli Zaretskii
2020-08-17 16:03 ` Andreas Schwab
2020-08-17 19:54 ` Stefan Monnier
2020-08-17 20:05 ` Andreas Schwab
2020-08-17 20:31 ` Stefan Monnier [this message]
2020-08-18 9:41 ` Yuri Khan
2020-08-18 16:48 ` Stefan Monnier
2020-08-18 18:47 ` Yuri Khan
2020-08-19 5:16 ` Madhu
2020-08-19 13:15 ` Stefan Monnier
2020-08-17 15:58 ` Eli Zaretskii
2020-08-17 16:11 ` Paul Eggert
2020-08-17 16:26 ` Lars Ingebrigtsen
2020-08-17 16:29 ` Paul Eggert
2020-08-17 17:01 ` Lars Ingebrigtsen
2020-08-17 17:08 ` Eli Zaretskii
2020-08-17 18:03 ` Lars Ingebrigtsen
2020-08-17 18:16 ` Eli Zaretskii
2020-08-17 18:43 ` Lars Ingebrigtsen
2020-08-17 19:28 ` Eli Zaretskii
2020-08-17 20:05 ` David De La Harpe Golden
2020-08-18 19:02 ` Basil L. Contovounesios
2020-08-19 3:56 ` Amin Bandali
2020-08-19 13:04 ` Stephen Leake
2020-08-19 9:13 ` Rebasing vs. merging Teemu Likonen
2020-08-19 9:49 ` Kévin Le Gouguec
2020-08-19 14:51 ` Eli Zaretskii
2020-08-19 16:09 ` Paul Eggert
2020-08-19 16:22 ` John Wiegley
2020-08-17 18:45 ` Rebasing vs merging (was: master bdda935 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs) Óscar Fuentes
2020-08-17 17:02 ` master bdda935 2/2: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs Eli Zaretskii
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: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvlfid81gy.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=rpluim@gmail.com \
--cc=schwab@linux-m68k.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).