Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Merge Conflicts / Update a Feature Branch with Git Rebase

    Merge Conflicts / Update a Feature Branch with Git Rebase

    Table of Content

    • Description
    • How to use it
    • How-to: Update a feature branch
    • Rebase via console
    • Rebase
    • Solve conflicts
    • Push changes

    Description

    With Git Rebase, the most current state of a branch, e.g. the development branch, can be fetched onto the obsolete feature branch.

    How to use it

    How-to: Update a feature branch

    1. Commit your changes within your branch. (How?) https://www.notion.so/build-one/Create-feature-branch-and-merge-it-f3f294d0e2f8446ebfecff4198b8eebb#f299eac44b1d4c5189b10e8ea7656aed
    2. Start a new Workspace of your branch (How?) → auf Page verlinken
    3. Open Git Graph (Where/how?): Source Control (Icon) > View Git Graph (Icon).
    4. Right click a little beside the name of the branch name of origin/develop.
    5. image
      image
    6. Now push the branch by right clicking directly on the name of your feature/branchname at the top.
    7. image
    8. Select Force with Lease in the next dialog.
    9. image

      → The orange sync message on the left is disappearing automatically.

    10. Close the Workspace and start a new one based on the branch.

    Rebase via console

    icon
    This tutorial covers how to Rebase a branch that is outdated from the develop branch in a Gitpod workspace

    Rebase

    To update the branch to the latest changes in develop you can import the changes with a rebase

    In a terminal in the Gitpod workspace of the outdated branch execute the next command:

    git rebase origin/develop

    Solve conflicts

    Solve conflicts if any.

    You can check the status of the conflicts with the next command:

    git status

    Push changes

    You can push the changes with the git tab in the Gitpod workspace or with this command:

    git push --force

    To see the changes restart the branch in a new Gitpod workspace

    Back to DocumentationDocumentation

    Back to Home Page

    Logo