Reputation: 79676
I have two different folders located not under the same parent folder.
Is it possible to make a Git repository that includes them both rather than I having to make two Git repositories one for each one?
Upvotes: 2
Views: 1036
Reputation: 346260
This can be done by having a folder with hard links to the two directories, thereby giving them a common parent folder.
Upvotes: 2
Reputation: 11784
Move these directories to a single parent, create a git repo, and create symlinks to the directories in previous paths.
In a similar situation I also created a script to make these symlinks automatically (I had much more of them than 2) and added it to the repo.
Upvotes: 3