git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "groups of files" in Git?

From
IDIgor Djordjevic <igor.d.djordjevic@gmail.com>
Date
Jul 13, 2017, 23:32 UTC
Message-ID
<40292f8e-e8a9-8b7a-112f-ef4b183a6b35@gmail.com>
In-Reply-To
<27a3c650-5843-d446-1f59-64fabe5434a3@gmail.com>
Just a small update/fixup:
On 14/07/2017 00:39, Igor Djordjevic wrote:
Show 9 quoted lines
> 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)
Show 10 quoted lines
> 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

Previous: Igor DjordjevicNext: Igor Djordjevic
Message 8 of 26 in “"groups of files" in Git?”
  1. Nikolay ShustovJul 11, 2017
  2. Stefan BellerJul 11, 2017
  3. Nikolay ShustovJul 11, 2017
  4. Junio C HamanoJul 13, 2017
  5. Nikolay ShustovJul 13, 2017
  6. Junio C HamanoJul 13, 2017
  7. Igor DjordjevicJul 13, 2017
  8. Igor DjordjevicJul 13, 2017
  9. Igor DjordjevicJul 13, 2017
  10. Randall S. BeckerJul 11, 2017
  11. Junio C HamanoJul 11, 2017
  12. Nikolay ShustovJul 11, 2017
  13. Stefan BellerJul 11, 2017
  14. Nikolay ShustovJul 11, 2017
  15. Lars SchneiderJul 11, 2017
  16. Nikolay ShustovJul 11, 2017
  17. Lars SchneiderJul 11, 2017
  18. Nikolay ShustovJul 13, 2017
  19. Igor DjordjevicJul 11, 2017
  20. Nikolay ShustovJul 13, 2017
  21. Junio C HamanoJul 13, 2017
  22. Nikolay ShustovJul 13, 2017
  23. Fredrik GustafssonJul 11, 2017
  24. astianJul 11, 2017
  25. Nikolay ShustovJul 13, 2017
  26. Igor DjordjevicJul 13, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.