Last active
December 2, 2016 03:26
-
-
Save beck/8a2b20c85e7931304dc122ffa9e17b66 to your computer and use it in GitHub Desktop.
git fixup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# git fixup - squash current changes into the last commit | |
# | |
# Stores the current head in branch 'doug/fixup'. | |
# | |
git branch -f doug/fixup | |
git add -A | |
git commit --fixup head | |
GIT_EDITOR=: git rebase -i --autosquash head~~ | |
echo | |
git diff doug/fixup | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment