how to force add a file in git code example Example: Force add despite the .gitignore file git add --force my/ignore/file.foo