Question

I'm currently trying to have the two branches of my repo in two completely different locations. Means I have branch master and builds.

master's path should be C:\some folder\some other folder\another folder\src

build's path should be C:\some folder\misc\builds

I have now discovered, that they both are in the same directory and will just change the contents if I switch the branches. How could I separate them on my local machine?

Was it helpful?

Solution

Firstly, why would you want to? The power of git allows you to work with multiple branches within the same path.

If you need the repo in another location, just clone the repository at that path:

C:\some folder\misc\builds> git clone http://pathToMyRepo.git

Then switch to the branch you want:

C:\some folder\misc\builds> cd \MyRepo
C:\some folder\misc\builds\MyRepo> git checkout builds
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top