How much is your shared hosting? You can get a VPS from Digital Ocean with (likely) much better dedicated resources for $5/mo and use whatever version of git you want.