skip to content
Alvin Lucillo

Git rebase

/ 1 min read

💻 Tech

Have you ever created a feature branch based on develop but it should have been based on another branch like release? You can create another branch or just use git rebase.

  1. Be sure your feature branch is checked out
  2. The rebase command: git rebase --onto release develop feature-branch
  3. If there are merge conflicts, resolve and stage them then continue: git rebase --continue
  4. Pull and push changes: git pull --rebase (keeps commit history linear) then git push
  5. If your PR has some changes already in release but they appear as PR changes, merge with release then push the changes: git merge origin/release then git push