News for hackers. Stuff that matters.
Re:How you can go wrong with Git by black-tea on Sunday November 04, 2018 @03:17AM (#18374850)
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).

There are no comments on this comment yet.