Slackbot
03/07/2023, 3:39 PMAlejandro Frias
03/07/2023, 5:54 PMds get their branch, let them know I’m working a change and coordinate it with a time I know they aren’t working on the branch actively, then push my commit, then they can pull it down with overwrite because they know they don’t have any local changes to worry about. But that’s a rare set of circumstances.
I’ve actually been having better luck with making a new PR, aka a new diff, with my changes and letting them merge it in through Github UI. I’ll do this for multi-file code change suggestions. Then they can merge it when their ready, or if there are weird conflicts because they already fixed some of the things, they can just cherry pick the parts they want then close the PR without merging itPranathi Peri
03/07/2023, 7:20 PMJacob Gold
03/07/2023, 7:26 PMJacob Gold
03/07/2023, 7:27 PMEdo Rivai
04/27/2023, 4:54 AMgit rebase --onto flow, where you rebase your local commits onto the remote, effectively bypassing the merge conflicts of prior work on the branch.
Example:
stack with branches a, b
branch a, commits a1, a2
branch b, commits b1, b2
coworker adds a3, restacks b, results in stack a1, a2, a3, b1', b2' (accent's indicate rebased commits)
coworker submits
in parrallel, I add b3, results in local stack a1, a2, b1, b2, b3
I want to submit, but get the gt conflict, I can rebase or overwrite
I don't want to overwrite, because that would erase b3
I pick rebase, this tries to rebase b1, b2, b3 on top of b1', b2'
If b2 changes lines that were changed in b1, this already results in conflicts that I am prompted to "solve" in the interactive rebase
...because the first rebase step is basically b1 onto b2'
One way to solve this is:
git fetch && git rebase --onto origin/b b2
This ignores my local commits b1, b2 and just adds b3 on top of b2'
Now I wonder if it would be possible for graphite to abstract over this git rebase --onto flow and do it automagically 🪄