Unkown filename appears on the Hierarch,

I don't understand one file that is not in a git repository and not in a local repository (not even a local and physical folder), but while I am about to commit or push, it seems like there is a hierarchy in the files? With this file checked, I can push and pull the code correctly, but I'm curious to know what the exact problem is.

enter image description here

+3


source to share


3 answers


.DS_Store is a hidden file created by macOS to store information about the containing folder. You have to add this file to your .gitignore , so git will never display it in your list without a trace / change.

According to wikipedia :



In Apple's macOS operating system .DS_Store is a file that stores the custom attributes of its containing folder, such as icon position or background selection. This name is an abbreviation for Desktop Services Store, reflecting its purpose. This is created and maintained by the Finder app in each folder

+3


source


.DS_Store is a MacOS system file that will appear in every directory for the default HFS + file system. Your Finder most likely does not display hidden files (with a dot prefix). You can configure .gitignore not to include .DS_Store, more details here



+1


source


It seems you changed the file name EditOrNewAddressVuewController.m

to EditOrNewAddressVuewController~.m

that saved this information in .DS_Store and after that you clicked on the code to the remote because this .DS_Store information contains an unconfirmed file. Git hierarchy of working trees,

If you do not like the unused files, uninstall .DS_Store file .gitignore . Useful link1 , link2 , link3

Even if there is one silly way to avoid this, the Clone project is in a different folder;)

+1


source







All Articles