I had issues with this myself for a while, with the Git system bombing out with error messages and giving me other headaches, although many such issues were solved by updating the Git software.
If you're having difficulties or you think you might not be doing something right, I'd suggest making sure you have the absolute most-recent version of Git installed.
Also, if you're on Windows, stay away from the TortoiseGit GUI software, its buggy as hell and doesn't work very well, and would only give you more headaches.
I'd stick with the command line interface.
If you still end up getting errors or run into problems, please copy and paste those results here, and someone would be able to try to help you.