Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Usage:
- # ./git_ammend_old.sh <commit-sha>
- # then we change pick to edit for this commit in interactive mode
- set -evx
- git stash && \
- echo "REMEBER TO CHANGE THE COMMIT TO EDIT" && \
- git rebase --interactive "${1}^" && \
- git stash pop && \
- git commit --all --amend --no-edit && \
- git rebase --continue
Add Comment
Please, Sign In to add comment