Slick23
Slick23

Reputation: 5907

Error when cloning a git repo

remote: Counting objects: 610, done.
remote: Compressing objects: 100% (352/352), done.
remote: Total 610 (delta 296), reused 434 (delta 210)
Receiving objects: 100% (610/610), 5.50 MiB | 2.19 MiB/s, done.
Resolving deltas: 100% (296/296), done.
error: Untracked working tree file '.DS_Store' would be overwritten by merge.

So, then, I'm left with an empty repository. I just added .DS_Store to my .gitignore file, but it seems I can't even pull a clean copy to my local machine.

Upvotes: 0

Views: 973

Answers (3)

Chris Livdahl
Chris Livdahl

Reputation: 4750

So, I use Tower as my Git client on the Mac. What worked for me was to first ignore all .DS_Store files in Tower by right clicking on the file in Tower and selecting "Ignore...". Tower then asks if I want to untrack the file, and I said yes, which issues a delete of the file on the remote repository. This was on the machine where I initially accidentally pushed the .DS_Store file from.

Upvotes: 0

manojlds
manojlds

Reputation: 301587

Adding to .gitignore will not solve your problem. It looks like the file is already in the repo. ( Remove it and then add it to gitignore)

You can delete the .DS_Store on a Mac using the Terminal.

Have a look at this discussion here: http://support.github.com/discussions/repos/503-untracked-working-tree

And this: http://support.github.com/discussions/repos/3712-ds_store

Upvotes: 2

yan
yan

Reputation: 20992

Try removing your existing .DS_Store file first.

Upvotes: 5

Related Questions