<div dir="ltr"><div>We use github and we work on many different branches at the same time.</div><div><br></div><div>The problem is that we have >5 repos now, and for each repo we might</div><div>have the same branches on all of them.</div>
<div><br></div><div>Now we use pip and install requirements such as:</div><div>git+ssh://<a href="http://git@github.com/repo.git@dev">git@github.com/repo.git@dev</a></div><div><br></div><div>Now the problem is that the requirements file are also under revision</div>
<div>control, and constantly we end up in the situation that when we merge</div><div>branches the branch settings get messed up, because we forget to change</div><div>them.</div><div><br></div><div>I was looking for a solution for this that would allow me to:</div>
<div>- use the branch of the "main" repo for all the dependencies</div><div>- fallback on master if that branch doesn't exist</div><div><br></div><div>I thought about a few options:</div><div>1. create a wrapper for PIP that manipulates the requirement file, that now</div>
<div> would become templates.</div><div> In this way I would have to know however if a branch exist or not,</div><div> and I didn't find a way to do that without cloning the repo.</div><div><br></div><div>2. modify PIP to not fail when checking out a non existing branch, so</div>
<div> that if it's not found it falls back on master automatically.</div><div><br></div><div>3. use some git magic hooks but I'm not sure what exactly</div><div><br></div><div>4. stop using virtualenv + pip and use something smarter that handles</div>
<div> this.</div><div><br></div><div>Any suggestions?</div><div>Thanks</div><div><br></div></div>