Git¶
Pull + Rebase¶
Squash¶
Squash the last 3 commits
If pushed to the remote branch, then you should push
Rebase Feature Branch onto latest Main Branch¶
First, make sure you are currently on your feature branch, then fetch the latest changes from the remote repository:
Next, rebase your feature branch onto the updated main branch:
If conflicts occur during the rebase, resolve them manually, stage the resolved files, and continue the rebase process:
After the rebase is completed, push the updated branch to the remote repository. Since rebasing rewrites commit history, use a safe force push:
If you need to stop the rebase process at any point, you can abort it:
Note: Avoid rebasing branches that are shared with other developers.
Vim¶
dd + P