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

Re: "git overlay" - command for overlaying branches

From
Michal Suchánek <msuchanek@suse.de>
Date
Nov 24, 2023, 20:59 UTC
Message-ID
<20231124205945.GA9696@kitsune.suse.cz>
In-Reply-To
<n46dskd3hudzssaam56jesxr5elzdvs3asurqvbxkgsdcqitjs@qlufclnnjpsq>
On Fri, Nov 24, 2023 at 05:39:12PM +0100, Oliver Bandel wrote:
Show 15 quoted lines
> Hello,
> 
> I'm adressing the problem with files separated from the main branch(es),
> which currently might be (more or less) solved with either submodules or subtrees.
> I want to suggest a new command here.
> 
> As usecase-example I assume a project that has 'branch_a' and 'branch_b'
> with some files may be identical, some different between them.
> I assume that the (classical) way the files are handled
> by belonging to those branches is intended.
> 
> Then say later I want to add more files to these branches,
> but don't want to commit them in either of these existing branches.
> Instead a branch 'branch_addons' is created, which solely contains
> files that are used in 'branch_a' as well as 'branch_b'.
Now you can merge branch_addons onto branch_a and branch_b and be done.

Unfortunately, git does not provide 'theirs' merge strategy while 'ours' is provided - somewhat asymmetrical.

Thanks
Michal
Previous: Oliver BandelNext: Oliver Bandel
Message 2 of 5 in “"git overlay" - command for overlaying branches”
  1. Oliver BandelNov 24, 2023
  2. Michal SuchánekNov 24, 2023
  3. Oliver BandelNov 24, 2023
  4. Michal SuchánekNov 25, 2023
  5. Oliver BandelDec 1, 2023

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.