Unkown filename appears on hierarachical 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

  • git hook to create staging branch
  • Cocos2d-x Project with Xcode 4.3 and Visual Studio 2010 GIT (BitBucket)
  • Great way to perform continious integration with Angular CLI and Jenkins
  • What does “changeset stripped” mean?
  • Cloning git repository failed using eclipse
  • Bitbucket: fatal: HTTP request failed when trying to clone Git repo
  • Subversion equivalent to Git's 'show' command?
  • Tracking changes in submodules
  • Git deleted untracked files on pull
  • How to resolve a conflict with git-svn?
  • Working with a forked git repository, except I cloned the public repo URL, not the private URL
  • Importing branches using git-p4 - unknown revision or path not in the working tree
  • 3 Solutions collect form web for “Unkown filename appears on hierarachical while commiting”

    .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

    It seems you have changed filename EditOrNewAddressVuewController.m to EditOrNewAddressVuewController~.mthat is saved this info in .DS_Store & you pushed code to remote thereafter this because that .DS_Store info there is untracked file appears on you Git working tree hierarchy,

    If you don’t like this untracked file,delete .DS_Store add .gitignore file. Helpful link1, link2,link3

    Even if, there is one silly way for avoiding to watch this,Clone project in another folder 😉

    .DS_Store is MacOS system file that will appear in each directory for default HFS+ filesystem. Your Finder most likely is not dispaying hidden files (with dot prefix). You can setup .gitignore not to include .DS_Store, details here

    Git Baby is a git and github fan, let's start git clone.