Reputation: 39
I started a new repo on Github and cloned it to my local machine at: ~/org-name/repo-name
I would like to create a github wiki for that repo. Where should I clone it to work on it locally?
Should it be: ~/org-name/repo-name/wiki and then maybe I add everything in wiki/ to the exclude/ignore list? Or is it bad form to have nested git repo's? Not sure if something is different about working with wiki's since they are connected to that repo.
If the answer is no, then I assume I should create another directory called ~/org-name/repo-name_wiki at the same level as my repo.
Thanks in advance, still learning...
Upvotes: 0
Views: 153
Reputation: 164639
You can have nested Git repos, but I would recommend against it. It's complexity you don't need. It's easy to forget they're two separate repos and accidentally make them dependent on each other. It's also easy to forget which directory you're in and start issuing Git commands in the wiki thinking you're in the source, or vice-versa. And having an extra subdirectory in your source might mess with your build system.
Nesting repos should only be done if they're dependent on each other, and only then by declaring it formally with git submodule
. The wiki and source are related, but they do not depend on each other.
I'd recommend cloning the source and wiki repos into a separate directories altogether, probably next to the project.
projects/
project-name/
project-name-wiki/
Or clone the project source and wiki under a common subdir.
projects/
project-name/
src/
wiki/
Which you pick depends on how you want to organize your projects.
Upvotes: 1