Is There Any Way to Clone a git Repository’s Subdirectory Only

less than 1 minute read

One of my main work projects consists of 5 different sets of SQL source code in one giant subversion repository. I’m not much of a subversion fan these days, so I access the repository with git svn and keep local feature branches to do all my work in.

Keeping 5 feature branches (one for each RDBMS) gets to be quite a pain. Especially when there is a merge conflict that I have to repeat 5 times in order to merge/rebase the branches back together.

I’m hoping by creating separate repositories for each RDBMS, I can work independently on a feature in each, and then merge them together as 1 feature branch in the main repository. I’ve done this with great success in test repositories.