Skip to content

Instantly share code, notes, and snippets.

@Shaz3e
Created January 22, 2025 20:10
Show Gist options
  • Save Shaz3e/cd17f79722783cb0ffe3c0b9a589777c to your computer and use it in GitHub Desktop.
Save Shaz3e/cd17f79722783cb0ffe3c0b9a589777c to your computer and use it in GitHub Desktop.
Rebase Development Branch from Main/Master Branch

Ensure you're on the development branch:

git checkout development

Fetch the latest changes from the remote (including the main branch):

git fetch origin

Using rebase (preferred to maintain a clean history): Change /main or /master accordingly

git rebase origin/main

Using merge (if you'd prefer to merge the changes with a merge commit):

git merge origin/main

Push the updated development branch to the remote repository:

git push origin development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment