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
- Commit your changes within your branch. (How?) https://www.notion.so/build-one/Create-feature-branch-and-merge-it-f3f294d0e2f8446ebfecff4198b8eebb#f299eac44b1d4c5189b10e8ea7656aed
- Start a new Workspace of your branch (How?) → auf Page verlinken
- Open Git Graph (Where/how?): Source Control (Icon) > View Git Graph (Icon).
- Right click a little beside the name of the branch name of origin/develop.
- Now push the branch by right clicking directly on the name of your feature/branchname at the top.
- Select Force with Lease in the next dialog.
- Close the Workspace and start a new one based on the branch.
→ The orange sync message on the left is disappearing automatically.
Rebase via console
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 Documentation
Back to Home Page