If in the case main is ahead of dev and want to update dev to main, "So what you're saying is you want to bring the changes from your master branch, into your dev branch? Switch to dev branch with a git checkout dev . Then git pull --rebase origin master "