A collection of personal and technical notes.
A branch to B branch?Go to A branch, list all of the commits, then copy the hash of the commit that you need to move to B branch.
sample-repo git:(A)
➜ git log --oneline
bb35b82 (HEAD -> main, origin/main, origin/HEAD) commit 1
a99d76e commit 2
Go to B branch, then cherry-pick the commit.
sample-repo git:(A)
➜ git switch B
sample-repo git:(B)
➜ git cherry-pick a99d76e