Skip to content

a git pre-commit hook that runs git rm --cached on macOS .DS_Store files

Notifications You must be signed in to change notification settings

nibley/remove_DS_Store_git_hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

remove_DS_Store_git_hook

Usage

Move or symlink to (git repo)/.git/hooks/precommit

This hook does not just prevent a commit adding .DS_Store files, it actively removes any files called .DS_Store that have been git-add-ed from the repository index (not from the disk).

Modify the FORBIDDEN variable in the hook to exclude a different filename.

If you want to exclude filenames that match a pattern instead, https://stackoverflow.com/a/37038262

About

a git pre-commit hook that runs git rm --cached on macOS .DS_Store files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages