When working with Git branches, you often need to update your feature branch with changes from the main branch. You can do this by either rebasing or merging. Rebasing moves your feature commits on top of the latest main branch commits, creating a straight, linear history without merge commits. Merging combines the histories and adds a merge commit, preserving the context of how branches came together. Use rebase when you want a clean history and are working alone or before sharing your branch. Use merge when collaborating to keep the full history intact. The execution table shows the step-by-step changes in branch state and history after each command.