Ask HN: How to Teach Git Rebase
18 points| poplarstand | 3 years ago
1. Do a rebase to get their branch in-sync with main, 2. Squash their branch's commits, 3. Make a push/force push to their branch, and 4. Create a pull request.
Which is lovely, but the process has a gnarly learning curve for our junior devs.
Is anyone familiar with documentation or tooling that does a good job of streamlining this sort of workflow?
nprescott|3 years ago
poplarstand|3 years ago
sethammons|3 years ago
poplarstand|3 years ago
That being said, the workflow for this project is unlikely to change. And, to be fair, the workflow has its benefits. The project history is very clean, PR code reviews are straightforward, etc.
FrenchyJiby|3 years ago
I can't recommend highly enough Learn Git Branching[1], an interactive demo for understanding rebases and cherry-picks.
Then try it a couple of tricky times, and you're settled.
[1]: https://learngitbranching.js.org/
ivanche|3 years ago
N.B. This doesn't do squash!
icedchai|3 years ago
oshirisuki|3 years ago
0xankit|3 years ago
normalhappy|3 years ago
https://gitimmersion.com/lab_31.html is likely where you would want to explore. hths!
poplarstand|3 years ago