Skip to content

Instantly share code, notes, and snippets.

@mLuby
Last active August 18, 2017 23:54
Show Gist options
  • Save mLuby/d61284646694b2364611cee8aa5479aa to your computer and use it in GitHub Desktop.
Save mLuby/d61284646694b2364611cee8aa5479aa to your computer and use it in GitHub Desktop.
git hist master..
# last commit is abc1234
# -Xtheirs resolves merge conflicts in favor of them (current branch)
git rebase -i abc1234^ -Xtheirs
# in vim:
# cwr[escape]
# :%s/^pick /squash /gc[enter]
# :wq[enter]
# Also worth noting to get a single commit with diff between
git reset --soft abc1234^
git commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment