I am a new user to git and I am starting a new project. I have a bunch of dot files that I would like to ignore. Is there an ignore command for git
Using the answers already provided, you can roll your own git ignore command using an alias. Either add this to your ~/.gitconfig file:
ignore = !sh -c 'echo $1 >> .gitignore' -
Or run this command from the (*nix) shell of your choice:
git config --global alias.ignore '!sh -c "echo $1 >> .gitignore" -'
You can likewise create a git exclude command by replacing ignore with exclude and .gitignore with .git/info/exclude in the above.
(If you don't already understand the difference between these two files having read the answers here, see this question.)