I want to somehow change the git directory structure. Currently the architecture is like
VL(repo) .git (hidden) code files ...... ..... I want it like html(repo) .git VL code files ...... ......
I had a solution to archive the current repo and then create the new repo with above structure. But the bad thing about this approach is that it removes all previous history. is there any better solution?
Changing the name of the root folder from
VLtohtmlshall be no problem since git only works on the directories below that level.So, what’s left is introducing the folder
VLbelow thehtmlfolder and move allcode filesthere:Using
git mvyou tell git that you moved things, so it could still keep track of the history.Edit:
As Benjol notes in his comment, using
git mvis not neccessary. You could achieve the same by copying<all your code>toVL, then dogit add VLgit rm <all your code>git commit -m "moved all my code under VLgit is smart enough to recognize the movement.