Ignore folder in stable, but not in devel branch
问题 I have the following folder structure for my project src/ test_unit/ package1/ test_unit/ package2/ test_unit output/ In my devel branch all folders should be version controlled, but the master/stable branch should ignore and not merge test_unit/ and output/ folder. How can I achieve this? With .gitignore it won't work because .gitignore will be merged between the branches. 回答1: Try a combination of .gitignore and .gitattributes files: in master/stable branch, you could have .gitattributes