. DS_Store file

The.ds_store is what the Finder uses to store the display properties of this folder: the location of file ICONS, for example.

Show/hide Mac hide files

  • According to:defaults write com.apple.finder AppleShowAllFiles -bool true
  • hidden:defaults write com.apple.finder AppleShowAllFiles -bool false

Delete the.ds_store file

  • find /path/to/files -name ".DS_Store" -delete
  • Find /path/to/files -- type f -- name ".DS_Store" -print -- delete
  • The find/path/to/files - type f - the name ". DS_Store "-print0 | xargs 0 rm - RDF

Configure the SVN to ignore the.ds_store file

  1. The editor~/.subversion/configFile;
  2. findglobal-ignoresConfiguration item, uncomment;
  3. Add files you want to ignore, separated by Spaces

    global-ignores = *.iml .idea .DS_Store .sass-cache node_modules *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyoCopy the code

This modification is global for the client and has no impact on the SVN server. The ignored file list will not appear in SVN operations.

Prevents.ds_store files from being generated

defaults write com.apple.desktopservices DSDontWriteNetworkStorestrue trueCopy the code

Configure Git to ignore the.ds_store file

  • .gitignoreConfiguration files are used to configure files that do not need to be added to version management
  • grammar
    • Directories begin with a slash /.
    • Wildcard multiple characters with asterisk “*”;
    • With a question mark “? “Wildcard single character
    • Contains a single character matching list in square brackets “[]”;
    • In exclamation point! “Indicates that matched files or directories are not ignored.
  • Git for.gitignoreThe configuration file matches rules from top to bottom, meaning that if the previous rule matches a larger range, the later rule does not take effect.
  1. Apply filtering to all users of the repo. Place the.gitignore file in the same directory as the working directory. After editing.gitignore, commit git add.gitignore

  2. Only for your repo backup filter to add/edit your working directory $GIT_DIR/info/exclude, for example, your working copy directory is ~ / SRC/project1, path as ~ / SRC/project1 /. Git/info/exclude

  3. Create an ignore file with any name you like ~/.gitglobalIgnore and configure git:

    Git config -- global core.excludesfile = ~/.gitGlobalIgnoreCopy the code
  • Ignore the.ds_store addition.DS_Store.gitignorefile