Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Merge and clean history
#! /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