Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is somewhat of a unique situation, I have a directory on my local drive (no Git repo) that I'd like to use as a new working tree on a branch from a Git repo within a separate directory also on my local drive that has a remote origin to Github.

Basically, I want to push the files within the directory that does not have a Git repo assigned as a branch on the remote origin from the directory that does. What would be ideal is a way to use separate directories for each branch which would allow me to push different working trees with entirely different source code.

The reasoning behind this is we have a few separate source controls that belong to the same project, so we'd like to push each to it's own branch while keeping different sets of files locally, so I can work on one branch in directory-A, another in directory-B, and have both point to the same remote origin. Any suggestions on how to go about doing this?

share|improve this question
1  
Why not just put each set of sources in a separate directory and put the parent directory under source control? Putting them in separate branches seems to be counter-intuitive and an abuse of the branch mechanism –  Brandon Invergo Jul 5 '13 at 15:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.