In my project I have 3 subdirectory with library projects merged by subtree strategy. Suppose I checkout master branch and make changes in main project as well as in libraries files. I can't checkout any lib branch because I will lose local changes. Run stash in one branch and apply it in another is not good idea.
How to split changes and commit it in right branches using only standard git tools (without开发者_JAVA百科 any git-subtree packages)???
You can use different working directories. ie:
git clone x main_project
git clone x lib1
git clone x lib2
A better way would be to use git-new-workdir script that's in git/conrib as Paulo Ebermann above has pointed out. You can find more information on how to use it over here: http://nuclearsquid.com/writings/git-new-workdir.html
精彩评论