If you want to rebase your branch onto dev instead of merging, you can use the following commands:
Fetch the latest changes from the remote repository:
git fetch origin
Switch to your branch (if you are not already on it):
git checkout your-branch
Rebase your branch onto dev:
git rebase origin/dev
Again, if there are any conflicts, you will need to resolve them manually.
Push the rebased branch to the remote repository (force push may be needed):
git push origin your-branch --force
Note : Using rebase can result in a cleaner project history, but it rewrites commit history, so be careful if you are working in a shared branch.
Top comments (3)
Nice Article
I use TortoiseGit, which gives a better visual feel.
I agree, but terminal feels better