In short, on a Unix-based system, you can download the Git source code from the Git Download Page, and then run something along the lines of :
$ make prefix=/usr all ;# as yourself
$ make prefix=/usr install ;# as root
You will need the expat, curl, zlib, and openssl libraries installed - though with the possible exception of expat, these will normally already be there.