Notes to Self

Alex Sokolsky's Notes on Computers and Programming

Merge vs Rebase Workflow

This is part of the development cycle.

merging-vs-rebasing

Presumably, you did:

THEN the trunk (main or master) was updated.

Merge

To merge the updated main into a feature branch:

git checkout main
git pull
git checkout feature
git merge main

If conflicts arise, resolve them and continue the merge.

Rebase

To rebase a feature branch on the updated main:

git checkout main
git pull
git checkout feature
git rebase main

If conflicts arise, resolve them and continue the rebase.

Publish it

git push --force origin feature