Skip to content

Merging with signed commits

Dimitar Nikolov edited this page Mar 18, 2026 · 1 revision

Prerequisites

In this tutorial, we will assume the following prerequisites:

  1. That we want to merge into the branch master
  2. That our branch is named test
  3. That our branch has already been pushed to origin, and the PR is approved.

Workflow

  1. Update the main branch:
    • Switch to the main branch - git switch master
    • Fetch any updates - git fetch
    • Pull any new commits so that master is updated to the latest - git pull
  2. Rebase your branch:
    • Switch to your branch - git switch test
    • Pull before rebasing in case someone has committed to your branch - git pull
    • Start the rebase - git rebase master. If you want to squash the commits, use git rebase -i master instead to start an interactive rebase.
    • After the rebase is over, if there have been no conflicts, you should be able to push the changes - git push. Check with git status git status whether you have any uncommitted changes.
  3. Merge your branch:
    • Switch again to the main branch - git switch master
    • Now merge it - git merge test
    • Push the changes - git push. If it doesn't work, use git push --force

Clone this wiki locally