Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

git fsck fails with the same error for 3 different repositories

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?

1 answer

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

please checkout and merge those folder, then try again.

how do I merge them?

Are you sure those two "resources" folders are in same directory?

>>> how do I merge them?
If both resources are in same directory, 

  • Rename any one of that "resources" folder as resources_old
  • Compare resources and resources_old folder and move all the new files from resources_old to resources.
  • Then compare the files which are in both resources and resources_old and do the necessary changes in respective files which is in resources folder.
  • Remove resources_old folder

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

528 views 6 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you