Created
March 30, 2017 17:34
-
-
Save beck/8e81e582cffc3d819c9e805b4dafbfe2 to your computer and use it in GitHub Desktop.
A git bin to auto fixup
This file contains hidden or 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/sh | |
# | |
# git fixup - squash current changes into the last commit | |
# | |
# Stores the current the current head in 'doug/fixup'. | |
# | |
git branch -f doug/backup | |
git add -A | |
git commit --fixup head | |
GIT_EDITOR=: git rebase -i --autosquash head~~ | |
echo | |
git diff doug/backup | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment