Intuitive Git Flow
Fetch and push
- your changes, local and remote
I’m afraid to force-push
- cherry-pick
- squash
- force-push on side branch
- protected branches
How do I un-commit this?
I reverted but my diff is empty?
- stack reverts and they cancel each other
I rebased but my diff is huge?
- rebase vs merge commits
- don’t rebase if you have merge commits (they get reapplied to new parent -> conflicts)
- OR interactive rebase + drop merge commits
Cleanup
- delete your stale branches, remote and local
Further reading