0

A developer has a git repository in a Ubuntu machine. The repository is shared with his Windows machine. In the Windows machine he runs Android Studio to modify the repository's files. As time goes, some unexpected files occur under the root of the repository. Their names seem gibberish, not composed of normal characters. After adding and committing these files, by git show --name-only, we see their names are:

<U+2BF3>眙℀眤<U+E91C>&
<U+2BF3>眙℀眤<U+EAEC>&
<U+2BF3>眙℀眤<U+EAFC>&
<U+2BF3>眙℀眤<U+EB9C>&
<U+2BF3>眙℀眤<U+EBBC>&
<U+2BF3>眙℀眤<U+ED3C>&

Their contents are like:

.git/objects/pack/pack-2a4023a45cc3c460438deafaceb33e89a8f7e368.pack 12
.git/objects/pack/pack-2a4023a45cc3c460438deafaceb33e89a8f7e368.pack 2047
.git/objects/pack/pack-2a4023a45cc3c460438deafaceb33e89a8f7e368.pack 5777

We can't figure out where they are from or how to prevent them from occurring again. If you have any idea about it, please kindly let me know. Thanks in advance.

ElpieKay
  • 27,194
  • 6
  • 32
  • 53
  • https://stackoverflow.com/questions/13115956/git-index-corruption/25880883 – CodeCaster Jun 28 '18 at 08:04
  • 2
    Given how heavily Git interacts with the filesystem and basically is its own virtual filesystem on top of that, I wouldn't want to add yet another abstraction layer in between in the form of Samba/SMB. That's basically asking for corruption. But on the other hand, that comment sounds like Voodoo/Cargo Cult (not understanding the issue and just writing it off to "weird behavior"). There must be an absolute reason in the end, but I would heavily suspect the Samba/SMB layer to be the culprit. – CodeCaster Jun 28 '18 at 08:06
  • @CodeCaster Thanks for your comments. I will suggest the developer to clone the repository to the Windows machine. The repository's index seems not corrupted yet, as git commands still work well. We wonder if these files are generated by Android Studio. – ElpieKay Jun 28 '18 at 08:20
  • 1
    I would bet on a Samba server bug or glitchy interaction. The contents look like link temporaries in something working around `ln` / `unlink` incompatibilities between client and server. The weird file names might be some sort of junk or encoded values in the Windows name (Windows itself uses UTF-16 encoding internally). – torek Jun 28 '18 at 13:24
  • @torek Thanks for your comment. The current solution is to run `git clean -f` to remove them. It's quite a frustrating problem like a tiny fishbone stuck in the throat. – ElpieKay Jun 28 '18 at 13:43

0 Answers0