This question has appeared in similar forms here and here, but they don\'t seem to match up with what I\'m looking for.
I\'m making a project in StaticMatic, a Ruby
I don't keep the executables, and symlinks in my repository... so I want to omit them as well when I do a "git status".
If, like me, you want to ignore symlinks, directories and executables (ala some of the files in $NAG_HOME/libexec you can add those files into .gitignore as follows:
file * | egrep 'ELF|symbolic|directory' | awk -F\: '{ print $1 }' >> .gitignore
echo ".gitignore" >> .gitignore
Then, when you do a git status, it won't spit back the list of those files if you have not added them to your repository.
If you really want to ignore a filename if it's a symlink or file but not if it is a directory, you can add to .gitignore :
/media
!/media/
To formulate it like @Chris_Rasys, this will :