I was doing some development on an Amazon default EC2 instance and wanted to commit some changes back to a repository using `git commit -p`, flag ‘-p’ not recognised, boo!
Turns out the default version of GIT that comes with the EC2 instances is 1.7.4.X. I’m not sure (and can’t easily find) what version the patch feature was added to `git commit`, but I have an install of 1.7.7.X available and it appears to be in there (update – git commit patch added in 1.7.6).
Anyway I had a quick look around the interwebs to find a repo/rpm for a newer version of GIT so I could make my patch commit. I eventually discovered that version 18.104.22.168 is sitting in the ‘amzn-preview‘ repository which is sitting on the box already. In order to upgrade GIT therefore you simply do:
sudo yum install --enablerepo=amzn-preview git
This will get you a more recent version, and the very useful patch feature.