I have a folder that I always want to exclude from staging/commiting to git. I don't want to add this file to our gitignore. So whenever I stage my changes, I have been using the command git add . -- ":!./ignoreddir/"
.
I want this to be a default behvior of my 'git add'. So I added the following to my .gitconfig but git says I have 'bad config' on the line.
[alias]
add = add -- ":!./ignoreddir/"
What's the right way to override the command in git config?