Skip to content

Instantly share code, notes, and snippets.

@nmicht
Forked from richistron/squash.sh
Last active March 21, 2018 05:04
Show Gist options
  • Save nmicht/103cb16f19dc5cf43b71 to your computer and use it in GitHub Desktop.
Save nmicht/103cb16f19dc5cf43b71 to your computer and use it in GitHub Desktop.
#! /bin/bash
# move to your local branch
git checkout local_branch
# pull the remotes
git fetch --all
# merge and squash
git merge origin/dirty_branch --squash
# create your new commit
git commit -m "New stuff"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment