Skip to content

Instantly share code, notes, and snippets.

@trustin
Created November 29, 2017 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trustin/6afd0edeae85e0585f4ec2ed2434431c to your computer and use it in GitHub Desktop.
Save trustin/6afd0edeae85e0585f4ec2ed2434431c to your computer and use it in GitHub Desktop.
#!/bin/bash -e
HEAD_COMMIT_ID=$(git rev-parse HEAD)
if [[ -n "$HEAD_COMMIT_ID" ]]; then
git commit --amend --reuse-message="$HEAD_COMMIT_ID"
git push --force
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment