Branching workflowGit
git rebase
Replay commits onto a new base for linear history.
Command
git rebase origin/main
Example usage
Sync feature branches with main or interactively edit commits.
git rebase origin/main
git rebase -i HEAD~5
Related tags
Branching workflowversion-controlworkflow