Can you have multiple independent directories in a git repository?

Hi everyone,

Sorry if this question has been asked before, but hours of googling could still not clear this up for me.

What i mean is, if you have two independent directories, say c:/a/b/c/dir_one and d:/x/y/z/dir_two (neither being a child or a parent of the other), is it possible to have the two in the same repository?

Sort of like if the repository contained two symlinks to the dirs, but without using symlinks (which would't work in this case)?

Or do they need to be in separate repositories?


If anybody knows the answer, please share it with me (and the rest of the world) :)

Thank you very much!


1 answer

0 vote


As far as I know, you can't do that git assumes a single parent directory.


I'm really glad to get a definite (even negative) answer on this issue.

Now I can put it aside and find another solution.


Thank you!


Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

647 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you