Skip to content

Instantly share code, notes, and snippets.

@tkellogg
Created June 24, 2013 15:43
Show Gist options
  • Save tkellogg/5851011 to your computer and use it in GitHub Desktop.
Save tkellogg/5851011 to your computer and use it in GitHub Desktop.
A git alias that's like commit --amend but adds changes to the last commit without changing the commit message
#!/bin/sh
msg=$(git log -n 1 --format="%B")
git reset HEAD^
git add -A
git commit -m "$msg"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment