Skip to content

Instantly share code, notes, and snippets.

@garyharan
Created February 24, 2020 17:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garyharan/06322d2b4547eda91e9d163f4be95852 to your computer and use it in GitHub Desktop.
Save garyharan/06322d2b4547eda91e9d163f4be95852 to your computer and use it in GitHub Desktop.
Workflow for splitting commits already pushed
# initiate the change with an interactive rebase from the point you want
git rebase -i SHA^
git reset HEAD^
# do this as many times as you need.
git add -p
git commit -v
# once all your changes are committed
git rebase --continue
git push --force-with-lease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment