In my branch A, I created a new directory myDir
. I commited all changes on that branch by git add .
and commit. I don't see any untracked file or directory.
Then I switch to branch B, I see untracked file myDir
.
How can I remove myDir
from branch B but still have it when switch to branch A ? I mean I don't want to really delete myDir
from hard disk and I don't want to see untracked file myDir
either on branches (other than branch A) .
I know there is git clean
command, but it deletes files from hard disk, right?