4

When I do git status

# On branch inline
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   "\357\275\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

hao
  • 197
  • 6
  • do you have a file with non-ascii characters? umlauts, kanji, etc.? – knittl Jul 18 '11 at 18:07
  • No I don't have non-ascii characters – hao Jul 18 '11 at 18:11
  • 1
    The "\357\275\236" encoding is the unicode replacement character [http://en.wikipedia.org/wiki/Specials_%28Unicode_block%29#Replacement_character]. No idea why it appears in your context, unless you have a hardware problem. – Rich Jul 18 '11 at 18:22
  • @Rich It’s actually U+FF5E FULLWIDTH TILDE – Josh Lee Apr 17 '12 at 20:21

3 Answers3

5

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.

Community
  • 1
  • 1
Kaj Kandler
  • 318
  • 4
  • 9
0

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!

Tho
  • 23,158
  • 6
  • 60
  • 47
0

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.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • Be careful with it. Better try a "dry run" first to see what is exactly removed. (--dry-run) It deleted also empty folders and non tracked-folders but it didn't delete the files with umlauts :-) – Alex2php May 02 '16 at 12:34