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

split directories into branches

From
SWshawn wilson <ag4ve.us@gmail.com>
Date
Jul 4, 2016, 16:45 UTC
Message-ID
<CAH_OBieCcx0_=vuZgoJ8GrZhhReEAhnjrz2pQwbwGgPFww4JmQ@mail.gmail.com>

I've got a chef cookbook repo where everyone started developing cookbooks in a single dev branch (not project specific). Minus a few edge cases, it should be fairly simple to split this up into feature branches based on /cookbooks/<feature>.

I tried: $ git filter-branch --subdirectory-filter cookbooks/<feature>-- <feature> And $ git subtree split --prefix cookbooks/<feature> -b <feature>

Which both seem to do the same thing (haven't looked at the subtree bash - guessing it does exactly the filter-branch). The issue is that it removes the directory tree (so obviously merges wouldn't work). I'm thinking some type of filter-branch --index-filter with a cherry pick (or similar) should work...?

Next: Konstantin Khomoutov
Message 1 of 9 in “split directories into branches”
  1. shawn wilsonJul 4, 2016
  2. Konstantin KhomoutovJul 4, 2016
  3. shawn wilsonJul 4, 2016
  4. Konstantin KhomoutovJul 4, 2016
  5. shawn wilsonJul 4, 2016
  6. Andreas SchwabJul 4, 2016
  7. shawn wilsonJul 4, 2016
  8. shawn wilsonJul 4, 2016
  9. Konstantin KhomoutovJul 5, 2016

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.