How to handle dependancy when switching git branch

2019-08-15 13:25发布

问题:

How does one handle .dll dependencies when switching branches in Git? I have only source code in git but when I switch to older branch and want to compile I will be compiling against newer version dependancies as my reference is not in the git repo.

回答1:

Good flow is to have dependencies described in your source code and a way to clean/fetch anew based on the branch you've just switched to.

In the unfortunate case you have to fetch the dependencies manually, you could probably have multiple working directories for your major branches/releases.