Skip to content

Instantly share code, notes, and snippets.

@phoebesimon
Created August 15, 2015 01:42
Show Gist options
  • Save phoebesimon/89832d999e00ef164a9c to your computer and use it in GitHub Desktop.
Save phoebesimon/89832d999e00ef164a9c to your computer and use it in GitHub Desktop.
git squash
disable auto gc
in .gitconfig file:
[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