1

I have repository with two branches for different versions of the code (a Python 2 and a Python 3 branch). I'd like to have hooks that set up the paths in the environment variables that point to the correct libraries for each branch. Is it possible to do this? The hooks are run as subprocesses so they can't modify the environment directly as far as I can tell.

1 Answer 1

0

One way to do this would be to write a bash function that I call instead of git checkout. This function could check starting branch and the target branch and modify the paths appropriately before calling git checkout.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .