Removing a file that looks like "\357\275\236"
When I do git status
# On branch inline
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# "\357\27开发者_Python百科5\236"
# nothing added to commit but untracked files present (use "git add" to track)
However, when I do ls -al
, I don't see anything that looks like \357\275\236
You likely have a file with UTF-8 characters in it's name. Run
git config core.quotepath false
to change the behavior of git and show you the file name that the OS will likely present to you.
Here is a workaround to deal with Mac OS X HFS+ UTF-8 encoded files and git! The answer to this question also includes a good explanation.
if you don't want that file and don't care about how to list it, just do:
git clean -df
That should get rid of it. Make sure you don't have any other work in progress. You could also inspect it with git gui
for fun first.
Hope this helps.
I use Smartgit UI + Msysgit on Windows and Bitbucket as Remote repository.
Also I couldn't remove any non-ascii file name from my local repository
so I tried to remove these files from Bitbucket and pull source code to my local repository and it Worked!
精彩评论