I have create a.gitignore
file at my ~
path by this code in my terminal:
touch ~/.gitignore
and also add this file and git defining excludes file by below code:
git config --global core.excludesfile ~/.gitignore
and then remove all of my .DS_Store
file using below command
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
(every file has been removed successfully and if I open xCode and press commit the D
label appears near this files)
Before I commit I add the .DS_Store
to the .gitignore
file by this command:
echo .DS_Store >> ~/.gitignore
it also works and write the value in the file but it is not working. Because when I back to xcode and commit the files and then back to finder and navigate to folders and back to xcode, I can see the .DS_Store files in commit dialog too.
Does someone have any idea about what is the problem?