I found myself wondering how to fix something I accidentally commited with GIT and I happened to stumble upon this fantastic page that is structured like a troubleshooting page. It will git you the exact command you are need

Git - Fix Up

** Big Thanks to Seth Robertson for this wonderful page