Skip to content

Instantly share code, notes, and snippets.

@6temes
Created December 15, 2016 07:57
Show Gist options
  • Save 6temes/0d9dca617212c311379113467459d5d6 to your computer and use it in GitHub Desktop.
Save 6temes/0d9dca617212c311379113467459d5d6 to your computer and use it in GitHub Desktop.
Git oops
[alias]
sync = "!git checkout master && git pull origin master && git fetch -p origin \
&& for f in $(git branch --merged | grep -v master | grep -v '*'); do \
git branch -d $f; done"
please = push --force-with-lease
amend = commit --amend --no-edit -a
oops = "!git amend && git please"
@mickeypash
Copy link

Excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment