Skip to content

Instantly share code, notes, and snippets.

@MelissaKaulfuss
Created April 10, 2018 03:27
Show Gist options
  • Save MelissaKaulfuss/b8fcbdf68f8eff782807aee8c2416eda to your computer and use it in GitHub Desktop.
Save MelissaKaulfuss/b8fcbdf68f8eff782807aee8c2416eda to your computer and use it in GitHub Desktop.
Git rebase workflow

Nice git workflows

  1. Keep commits small/atomic
  2. Make use of fixup commits (for related changes) git commit --fixup sha
  3. If responding to a request/comment in PR reply with a comment like "Done in <commit-sha>", then:
  • git push origin head
  • git rebase -i origin/master --autosquash
  • Once there's a nice history: git push origin head -f
  • git checkout master && git merge br-name --ff-only
  1. Remember to run your specs again!
  2. git push origin master
  3. Delete remote branch
  4. Delete local branch: git branch -d branch/name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment