Generate a git patch for a commit