I'm running git fsck
command on some repositories, and for 3 of them I got the same error:
error in tree b2b510c83ea553c587ebe5bc160e92cb7888393a: duplicateEntries: contains duplicate file entries
error in tree b3969ac6fe6b6359d48006e6a4cf3ffd5a4350a3: duplicateEntries: contains duplicate file entries
error in tree 5a7445940626358083a782ba5c81f956c7f82ac5: duplicateEntries: contains duplicate file entries
any idea how to fix it? what does it mean that it appears exactly the same for all?
Hi There,
I guess you or one of your teammates/colleagues are using Windows OS. Windows OS's file system is case sensitive, so you can have filename.txt and Filename.txt in same place.
That's why you are getting this error, when you run git fsck. One or more files in your repositories have this kind of file name. Please check and find those files then rename/remove it based.
If your are window users, please run this command to find those files. I am not using windows, so I didn't tested this command. But I am sure this wouldn't delete/harm your files.
git ls-tree -r HEAD | group { $_ -replace '.{12}(.{40}).*', '$1' } | ? { $_.Count -gt 1 } | select -expand Group
Please let me know, if this answer helps you.
It's not Windows OS but Linux Redhat. when running git ls-tree I can see the duplication:
040000 tree bedd93cf41a5d3ed9b19a2062cd7f49e930d4227 resources
040000 tree bedd93cf41a5d3ed9b19a2062cd7f49e930d4227 resources
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please checkout and merge those folder, then try again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure those two "resources" folders are in same directory?
>>> how do I merge them?
If both resources are in same directory,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.