Running git pull created some unplayable files in my local copy. Files were moved on the remote control, but attraction did not delete the files in my working directory. I spent a lot of time studying this, but I can not find such cases. Is this the intended behavior, am I missing something, or both?
Background
I made a patch and sent it to the open source project developers, but then I wanted to remove the local commit and git pull βofficialβ patch after it was committed to the remote computer. So I did a bunch of βthingsβ before resetting the previous official HEAD. "Stuff" means things like git checkout -- <file> , git reset HEAD^ and other commands that I can't remember since I'm new to git and I'm trying to research best practices.
Anyway, after I finally unzipped my commit and did git pull , I got 66 commits for changes, including my patch, and everything looked great. But then git status showed that two files were not tracked. I made gitk <untracked_file1> and I saw that about 20 commits ago, the file was moved to another directory. The file now exists in the new location, but instead of deleting the old file, it appears as unsolicited.
I tried to hard reset according to these instructions , but the files are left without a trace. I can do git clean -f to clean them, but I wonder why the files are not deleted automatically.
source share