3 ms·
If you enforce a convention that private branches start with the developers initials (nb-restructre-everything), and that developers can force-push only their o
by benesch 13y ago
If you enforce a convention that private branches start with the developers initials (nb-restructre-everything), and that developers can force-push only their own branches, you can rely on each developer to keep their remote up-to-date.
You can even rewrite a branch shared between developers that hasn't been merged mainline: once it's done, have one of the developers create a duplicate branch in their own private namespace, and rebase and merge that.
Accidents happen, though. If you want to be guaranteed safety, enforce that every developer have their own remote fork. They can rebase at-will on their own fork, and submit pull requests to the mainline repository. (If you're using GitHub, this is dead simple, since you can open pull requests across forks.) This method introduces a fair bit of hassle and overhead for a smallish team, though.