Search code examples
iosxcodegitbitbucketgit-commit

Unknown filename appears on hierarchical while commiting


I do not understand one file which is not on git repository & not on local repository (not even local & physical folder) but while I am going to commiting or push it seems in files hierarachical? By unchecking this file I am able push & pull code properly but I am curious to find what is the exact issue.

enter image description here


Solution

  • .DS_Store is a hidden file, which is created by MacOS to store the information about the containing folder. You should add this file to your .gitignore, so the git will never display it in your untracked/modified list.

    According to wikipedia:

    In the Apple macOS operating system, .DS_Store is a file that stores custom attributes of its containing folder, such as the position of icons or the choice of a background image. The name is an abbreviation of Desktop Services Store, reflecting its purpose. It is created and maintained by the Finder application in every folder