I know this question has been asked a million times, but my ~/.gitconfig consists of only two lines, that are character correct with the tutorial.
git config
These git config lines are commands that you should run, not the contents for the config file.
This is my ~/.gitconfig:
[user]
name = Luigi R. Viggiano
email = luigi.viggiano@...
[color]
ui = true
[merge]
tool = p4merge
[diff]
tool = p4merge
[push]
default = simple
your ~/.gitconfig is not in the correct format.
You don't need to put the commands:
git config --global user.name "trx"
git config --global user.email chazx@live.com
in a file... you need to type them at the terminal.
Delete your ~/.gitconfig and manipulate it using the git config command at the terminal, as explained in the tutorial.