We can use Git's ability to continue tracking files even if they're listed in .gitignore. So, this is enough for .gitignore:
$ cat .gitignore
/*
For each file that you want to track, run add -f (the -f parameter overrides ignoring both in .gitignore and .git/info/exclude):
git add -f .gitignore
git add -f .profile
git add -f .zshrc
git add -f .ssh/config
Once having indexed a file, Git will track all changes despite the fact that the file is ignored. The same works for a directory, but only for the files that are actually present:
git add -f somedirname
If you want to track a whole directory with all new files that appear in it, it can be excluded from .gitignore in a way, described in the answer by camhanswer by camh:
!/somedirname
If you ever want to stop tracking a file, this commands removes a file from Git's index but leaves it untouched on the hard drive:
git rm --cached .ssh/config