Guest User

Untitled

a guest
Oct 16th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Usage:
  4. # ./git_ammend_old.sh <commit-sha>
  5. # then we change pick to edit for this commit in interactive mode
  6.  
  7. set -evx
  8. git stash && \
  9. echo "REMEBER TO CHANGE THE COMMIT TO EDIT" && \
  10. git rebase --interactive "${1}^" && \
  11. git stash pop && \
  12. git commit --all --amend --no-edit && \
  13. git rebase --continue
Add Comment
Please, Sign In to add comment