Force add despite the .gitignore file

Question

Is there a way to force git to add a file despite the .gitignore file?

Answer

See man git-add:

   -f, --force
       Allow adding otherwise ignored files.

So run this

git add --force my/ignore/file.foo

How do you attach a new pull request to an existing issue on github?

Temporarily switch working copy to a specific Git commit