Reputation: 21
So I put git into folder B, but it needs to be in folder C. Folders go A>B>C
I'm worried to just move folder C to folder A because some of the files are already using their current path available to them.
Is there a clean way to just move the repo from B to C?
(Using Mac/Unix)
Upvotes: 0
Views: 39
Reputation: 13941
As far as Git is concerned, you can just move the directory to a new location. Git stores all of its internal metadata in the hidden .git
directory contained within the root directory so if you move the root, that will move with it.
Upvotes: 1
Reputation: 142572
you can use git mv to move files to the new location.
git mv <old path> <new path>
Read this to learn more about it:
https://githowto.com/moving_files
Also take a look on this question if you need something more complex:
How do I Re-root a git repo to a parent folder while preserving history?
Upvotes: 1