@daniloparrajr

How to sync feature branch in git

  • 5/13/2022
  • 1 min read

Solution

Make sure local repo is updated by

Terminal window
git pull --rebase

Go to the feature branch and rebase to the main branch

Terminal window
git switch <feature-branch>
git rebase main

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

Terminal window
git add .

Once satisfied with the fix, continue rebasing by

Terminal window
git rebase continue