Assume I have a structure in master.
d - src
- main ...
- resources ...
- target
- xyz
Files xyz should not be tracked, so I added into .gitignore target/* and commit the structure
- git commit -m 'initial structure'
I create 2 branches
- git branch t1
- git branch t2
and switch to t1
- git checkout t1
I start doing some work, compile stuff, such that target is populated. I commit my changes to t1.
- git commit -a 't1 specific changes'
then I switch to t2
- git checkout t2
When I look into target, it is still populated with the files created when branch t1 was active, while I would like to have these 'cleared out'
I found a similar discussion stating that git should behave differently than I see. Git is deleting an ignored file when i switch branches
What am I missing ?
Francis