Skip to content

Instantly share code, notes, and snippets.

@kaustavha
Forked from phoebesimon/gist:89832d999e00ef164a9c
Last active August 29, 2015 14:27
Show Gist options
  • Save kaustavha/1c253cb8f7fb4227d567 to your computer and use it in GitHub Desktop.
Save kaustavha/1c253cb8f7fb4227d567 to your computer and use it in GitHub Desktop.
git squash
git config --local --add gc.auto 0
git checkout master
git pull
git checkout your_branch
git reset --soft commit_hash_before_your_changes //(can be found by doing git log)
git stash
git merge master --ff
git stash apply
git commit
git push -f origin your_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment