@daniloparrajr

How to sync feature branch in git

  • 5/13/2022
  • 1 min read

Solution

Make sure local repo is updated by

git pull --rebase

Go to the feature branch and rebase to the main branch

git switch <feature-branch>
git rebase main

If there’s a conflict, simply fix the conflict and add the fix by

git add .

Once satisfied with the fix, continue rebasing by

git rebase continue