3 ms·
Technically the code isn't lost after you do a force push, but it does cause some extra work. You can disable force push on branches. It's probably a good idea
by black-tea 8y ago
Technically the code isn't lost after you do a force push, but it does cause some extra work.
You can disable force push on branches. It's probably a good idea for any branch that is shared. People sharing a branch need to coordinate and rebase their own branches locally. You can merge without any coordination, but it creates a messy history.
I have a rule where you never rebase during a code review, but you do rebase at the end. It's a pet peeve of mine when someone addresses my concerns by amending a commit. Please don't. Use a fixup commit so I can follow what you've done. Then at the end the maintainer should ask you to rebase before he merges it (do autosquash, then manual squashes etc, then base on master).