Sometimes when I have some modified files (tracked) in my Working Directory and I am trying to checkout to another branch, Git does not complain and moves to the new branch by carrying these unstaged files.
Some other times, it complains about these files (changes will be lost) and I have to use
git checkout -f
as to move to another branch. The problem is it does not make sense to me why Git behaves differently under the same(?) circumstances. From my point, I should expect always to complain since there are unstaged files in the Working Directory since git checkout
updates it.