Hacker News new | ask | show | jobs
by sdegutis 3633 days ago
1. Rebase onto master.

2. Pull master just before you push.

3. If there are new commits, rebase onto master again.

If everyone on the team follows these 3 rules, it won't get too messy to untangle.

1 comments

Unless I'm missing something, there's a race condition between "check if there are new commits to pull before force pushing" and "new commits come in". This workflow might work for a very small team but for a larger team it is bound to cause problems.
He may have editted his comment, but it doesnt mention `force`. As written, there is no race condition.
Right. As logn as you døn't force-push, then you can rebase until the problems are all gone. Although, this 3-step solution works best with proper team communication and planning.
You've probably seen it in other comments, but if not, `--force-with-lease`