From: Igor Djordjevic <igor.d.djordjevic@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Nikolay Shustov <nikolay.shustov@gmail.com>
Cc: Stefan Beller <sbeller@google.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: "groups of files" in Git?
Date: Fri, 14 Jul 2017 01:32:52 +0200 [thread overview]
Message-ID: <40292f8e-e8a9-8b7a-112f-ef4b183a6b35@gmail.com> (raw)
In-Reply-To: <27a3c650-5843-d446-1f59-64fabe5434a3@gmail.com>
Just a small update/fixup:
On 14/07/2017 00:39, Igor Djordjevic wrote:
> I guess it would be a kind of alias to doing:
>
> $ git checkout featureA
> $ git add ...
> $ git commit
> $ git checkout master
> $ git reset --hard HEAD^
> $ git merge featureA featureB
>
This should, in fact, be:
$ git checkout featureA
$ git commit
$ git checkout master
$ git reset --hard HEAD^
$ git merge <HEAD@{1} parents>
(removed "git add" step, as that is needed for proposed single step
solution as well, as a usual step preceding the commit; also replaced
concrete branch names in the last step with a more generic
description, better communicating real intent)
> In the same manner, it should be possible to drop a commit from the
> feature branch in a single step, for example returning to the state
> as shown in (1), or even "port" it from one branch to the other, like
> this (without a need for it to be the last commit, even):
>
> (3) o---o---o---\ (featureA)
> / \
> ---o---o---o-------M' (master, HEAD)
> \ /
> o---o---A'--o (featureB)
Here, the diagram should look like this:
(3) o---o---o---\ (featureA)
/ \
---o---o---o-------M'' (master, HEAD)
\ /
o---o---A''-o (featureB)
(replaced leftover M' from the previous diagram with M'' to show it`s
yet another (updated) merge commit, different from both M and M' in
terms of SHA1, yet the contents would probably, but not necessarily,
be the same for all three; same for leftover A', replaced with A'')
Regards,
Buga
next prev parent reply other threads:[~2017-07-13 23:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 15:45 "groups of files" in Git? Nikolay Shustov
2017-07-11 17:18 ` Stefan Beller
2017-07-11 17:47 ` Nikolay Shustov
2017-07-13 18:22 ` Junio C Hamano
2017-07-13 19:47 ` Nikolay Shustov
2017-07-13 21:20 ` Junio C Hamano
2017-07-13 22:39 ` Igor Djordjevic
2017-07-13 23:32 ` Igor Djordjevic [this message]
2017-07-13 23:40 ` Igor Djordjevic
2017-07-11 17:27 ` Randall S. Becker
2017-07-11 17:27 ` Junio C Hamano
2017-07-11 18:10 ` Nikolay Shustov
2017-07-11 18:19 ` Stefan Beller
2017-07-11 18:30 ` Nikolay Shustov
2017-07-11 17:39 ` Lars Schneider
2017-07-11 17:54 ` Nikolay Shustov
2017-07-11 20:20 ` Lars Schneider
2017-07-13 15:21 ` Nikolay Shustov
2017-07-11 22:46 ` Igor Djordjevic
2017-07-13 15:37 ` Nikolay Shustov
2017-07-13 18:09 ` Junio C Hamano
2017-07-13 19:31 ` Nikolay Shustov
2017-07-11 20:09 ` Fredrik Gustafsson
2017-07-11 22:27 ` astian
2017-07-13 17:04 ` Nikolay Shustov
2017-07-13 23:06 ` Igor Djordjevic
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=40292f8e-e8a9-8b7a-112f-ef4b183a6b35@gmail.com \
--to=igor.d.djordjevic@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nikolay.shustov@gmail.com \
--cc=sbeller@google.com \
/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).