I have a local git repository which is inside a project. I have decided that some code needs to be in another project but I only want one git repository.
Current directory structure:
Solution->
- Project1
- .git
- Project2
Desired directory structure:
Solution->
- .git (tracks both projects)
- Project1
- Project2
How do I move .git
to the root folder (Solution
) so that it can begin to watch both Project1 and Project2 without losing track of the modifications/commits?
Note: I don't really care about preserving the history of the files that are going to be moved to the Project2 folder.
Note: This is not a duplicate to (this question) because I'm not moving a git repository and its whole contents. I want to only move the git repository to the root folder.