Here is my problem (via example steps):
- I have a Git repo with two different branches (branchA and branchB), which are currently identical.
- Checkout to branchB and create a new file "foo.txt".
- Add that file to ".gitignore" of that branch, so that it is successfully ignored in branchB.
- Create another file "hello.txt", stage it and commit it.
- Checkout to branchA.
- foo.txt appears in branchA, but hello.txt does not.
Why does foo.txt appear in branchA and not get "hidden" like hello.txt does?
From my perspective this is a great annoyance and seems like a bug/feature request, but has Git been designed to act this way? I was surprised to find no other people complaining about this.