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

How to reorganize git tree

From
AEAlan Edwards <kae@xnet.com>
Date
Jan 26, 2012, 18:35 UTC
Message-ID
<20120126133505.it34vehs0044o848@webmail.xnet.com>

I was new to git about a year ago and created a git directory structure containing several different projects like:

/source/web_server1/project1 /source/web_server1/project2 /source/web_server1/project3 /source/web_server1/project4 /source/web_server2/project5 /source/web_server2/project6

where my massive .git repository is:

/source/.git (containing all the projects on all the web servers.... Oops!) There seems to be lots of "loose objects".

Somewhere along the way I figured out that this probably wasn't a good idea and I ended up making a git repository under one of the projects:

/source/web_server1/project4/.git

Not sure if that was the best decision either. I've already checked in changes to the /source/web_server1/project4/.git repository for project4 and I've checked in changes to project2 into the /source/.git repository.

Of course I now realize the errors of my way and would like to restructure.

the only changes that have been checked into the big upper level repository are changes for project2. Is it possible to carve out those changes from the /source/.git repository and create a new /source/web_server1/project2/.git repository?

Maybe the way to deal with this is to remove the other directories from the /source/.git repository and leave project2 there.

Any one have any suggestions?

I'm not sure if I'm posting this in the right place (I'm at work and they don't allow access to many places and I don't have access to the news group).

Thanks!
-Alan Edwards
  kae at xnet dot com (my home email address)
Next: Ben Walton
Message 1 of 3 in “How to reorganize git tree”
  1. Alan EdwardsJan 26, 2012
  2. Ben WaltonJan 26, 2012
  3. Jakub NarebskiJan 26, 2012

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.