I have a git repository on a mac, when I use git status
in terminal it says
On branch master
nothing to commit, working directory clean
when I try to pull changes from repository git pull repositoryName master
error: The following untracked working tree files would be overwritten by merge:
.DS_Store
Please move or remove them before you can merge.
so I tried to remove it with git rm .DS_Store
but it says
fatal: pathspec '.DS_Store' did not match any files
I then tried to remove the cached file and add it again with git rm --cached . -r
and git add .
with a .gitignore directive that would ignore .DS_Store but the problem still persists.
I tried lots of commands that I saw on different posts without success. Any help would be appreciated.