One minute
Cheatsheet : git
A collection of git notes i usually have to lookup
Create a new local branch and push to remote
Remove any local branches that dont exist on remote
Show staged files
View changes that have been added but not commited:
Update submodules
Update submodules to the latest versions (assuming they are already initialised with git submodule init):
Patching main and long running feature branches without cherry picking
If you want to
Create a new branch from the common merge base:
Check you’ve got the right merge base by confirming you only see the expected changes:
PR your changes into the main and feature branches as normal.
There’s a really in depth description of why cherry picking should be avoided from Raymond Chen at Microsoft.