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

Re: split directories into branches

From
SWshawn wilson <ag4ve.us@gmail.com>
Date
Jul 4, 2016, 18:15 UTC
Message-ID
<CAH_OBie4dUB8WXfmKhLaezVKi0=LhnFw=wKJO1c3oUMA7VkYdw@mail.gmail.com>
In-Reply-To
<20160704203946.3ac8d3205c08bfaee9a93a46@domain007.com>

On Mon, Jul 4, 2016 at 1:39 PM, Konstantin Khomoutov <kostix+git@007spb.ru> wrote:

> On Mon, 4 Jul 2016 12:45:39 -0400
> shawn wilson <ag4ve.us@gmail.com> wrote:
>
Show 5 quoted lines
>
> To achieve what you're after I used `git subtree split` followed by
> `git filter-branch --tree-filter ...` which moved all the files under
> the directory hierarchy `git subtree split` removes.
>
Ah, that looks like it should work - thanks
Show 5 quoted lines
> I know Git tracks content, not files (and directory) but still many
> folks have "stable" directories for their files, assign certain
> semantics to them etc.  I've needed such transfers myself, and this
> topic has been raised more than once by folks over there on the
> git-users mailing list.

Or just an option for git {rm,mv,cp} that would allow simple rewriting of history. Ie: git mv HEAD~3.. -- foo bar (obviously not the sanest thing in most cases but would be a shorter reach than filter-branch - and if newest isn't head then it'd what? move it back during commits for who knows what - still...)

Thanks for pointing out the users list - didn't notice it and sorry for posting a user question on a dev list.

Previous: Konstantin KhomoutovNext: Konstantin Khomoutov
Message 3 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.