Starting on your newBranch:

git checkout master to get back on the master branch

git pull origin master to get the most up-to-date version of the master branch

git checkout newBranch to get back on your newBranch

git rebase origin/master -i to perform an interactive rebase. The command will take you through and let you pick commits, rename them, squash them, etc. Assuming you will want to keep them all, it will pause when there are merge conflicts and then you'll have to resolve them in your text editor, it will tell you where (in your text editor) that the conflicts occur. You will have to add those files after fixing them then do git rebase --continue to proceed with the rebase.

When you're done with the rebase your newBranch will be synced up with master and have any commits in master that weren't there when you started your work, and all merge conflicts will be resolved so that you can easily merge your newBranch.

Answer from chevybow on Stack Overflow
Top answer
1 of 5
71

Starting on your newBranch:

git checkout master to get back on the master branch

git pull origin master to get the most up-to-date version of the master branch

git checkout newBranch to get back on your newBranch

git rebase origin/master -i to perform an interactive rebase. The command will take you through and let you pick commits, rename them, squash them, etc. Assuming you will want to keep them all, it will pause when there are merge conflicts and then you'll have to resolve them in your text editor, it will tell you where (in your text editor) that the conflicts occur. You will have to add those files after fixing them then do git rebase --continue to proceed with the rebase.

When you're done with the rebase your newBranch will be synced up with master and have any commits in master that weren't there when you started your work, and all merge conflicts will be resolved so that you can easily merge your newBranch.

2 of 5
22

It seems that your GitLab is configured to not allow feature branches with merge commits to be merged into the master branch. This is where you took a wrong turn:

After that I committed my local changes and pulled the changes in newbranch to local branch.

What you should have done is to commit your work, and then pull via rebase from the remote newbranch branch. To remedy the situation, I suggest nuking the merge commit which happened when you pulled from GitLab. A merge commit is likely what happened, because git pull by default uses the merge strategy, not the rebase strategy. Check git log, and see how many commits were introduced due to the incorrect pull. Assuming there were only a single merge commit, then the following should do (NOTE: all uncommitted modifications in the working directory will be irreversibly deleted, so save/commit before proceeding):

git reset --hard HEAD~1

Verify again that git log looks correct. You should now see only your latest commit on the top of the branch. Assuming you do see this, then you are good to pull via rebase:

git pull --rebase origin newbranch

This will bring in your colleague's commit, then replay your latest commit on top of the branch. Finally, you may push the branch out, and the problem should be resolved:

git push origin newbranch

Note that doing a hard reset as I have suggested above is generally not a good thing to do. But in your case, no one has seen that merge commit yet, because GitLab rejected your attempt to push. So you should be safe in removing it.

🌐
Medium
medium.com › devops-with-valentine › gitlab-merge-blocked-fast-forward-merge-is-not-possible-7f86bf79e58b
GitLab: Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally. | by Valentin Despa | DevOps with Valentine | Medium
December 27, 2021 - ... Usually, you can rebase directly ... the UI and get this message: ... The first step is to clone the repository on your computer and to go into the respective branch....
Discussions

git - Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally - Stack Overflow
I'm working on two branches and they have an open pull request to the develop branch. My two branches are: test-increase-test-coverage feat-add-daily-mileage I got this error when I wanted to merge More on stackoverflow.com
🌐 stackoverflow.com
How to solve gitlab merge blocker on the command line with git? - Stack Overflow
When working with gitlab, I might come to a point where I cannot merge changes from a branch into the main branch. The error message given is Merge blocked: fast-forward merge is not possible. To m... More on stackoverflow.com
🌐 stackoverflow.com
January 11, 2022
Cannot merge using "Rebase and fast-forward" when requiring signed commits
Description I am trying to setup up a bunch of repos so that any committers must push signed commits to their feature branch before they are able to merge to main. I have set the main branch to hav... More on github.com
🌐 github.com
3
July 28, 2025
Help needed: merge requests without rebasing?
github and gitlab are both just git. you just have changes that cant be fastforward merged More on reddit.com
🌐 r/gitlab
22
5
December 8, 2025
🌐
GitLab
docs.gitlab.com › user › project › merge_requests › methods
Merge methods | GitLab Docs
To rebase a merge request’s branch without triggering a CI/CD pipeline, select Rebase without pipeline from the merge request reports section. ... Available when fast-forward merge is not possible but a conflict-free rebase is possible.
🌐
Stack Overflow
stackoverflow.com › questions › 72327954 › merge-blocked-fast-forward-merge-is-not-possible-to-merge-this-request-first
git - Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally - Stack Overflow
... Save this answer. ... Show activity on this post. got this error when I wanted to merge them with develop branch · You might need to rebase them locally on top of origin/develop first.
🌐
Codemia
codemia.io › home › knowledge hub › fast-forward merge is not possible. to merge this request, first rebase locally
Fast-forward merge is not possible. To merge this request, first rebase locally | Codemia
September 23, 2025 - That message means the target branch moved forward after your branch was created, so the hosting platform cannot merge your work as a simple fast-forward. The usual fix is to rebase your branch onto the latest target branch locally, resolve conflicts if needed, and then push the updated branch ...
🌐
GitHub
github.com › orgs › community › discussions › 27521
Rebase and merge is blocked incorrectly? · community · Discussion #27521
July 28, 2022 - Please reload this page. Something went wrong. There was an error while loading. Please reload this page. ... Merging a pull request using the "Rebase and merge" option is limited to 100 commits.
🌐
Easy Bug Fix
easybugfix.com › fixed-fast-forward-merge-is-not-possible-to-merge-this-request-first-rebase-locally
[FIXED] Fast-forward merge is not possible. To merge this request, first rebase locally - Easy Bug Fix
January 5, 2023 - What you should have done is to commit your work, and then pull via rebase from the remote newbranch branch. To remedy the situation, I suggest nuking the merge commit which happened when you pulled from GitLab.
🌐
FixeMe
bugs.fixeme.com › home › [fixed] merge blocked: fast-forward merge is not possible. to merge this request, first rebase locally
[FIXED] Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally - FixeMe
June 4, 2022 - I got this error when I wanted to merge them with develop branch: Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.
Find elsewhere
🌐
Medium
medium.com › @zakarialahmam28 › merge-request-rebase-28ca1445bf23
Merge request & Rebase. rebasing a merge request | by Zakariae lahmam | Medium
February 9, 2024 - ... 1-Commits were made in different ... so there are no conflicts. In this case, unless you are a maintainer and are merging in the merge request, you do not need to rebase at this time....
🌐
OpenMSCG
software.rcc.uchicago.edu › help
Fast forward merge · Merge requests · Project · User · Help
If the target branch is ahead of the source branch and a conflict free rebase is not possible, you need to rebase the source branch locally before you will be able to do a fast-forward merge.
🌐
Stack Overflow
stackoverflow.com › questions › 70664689 › how-to-solve-gitlab-merge-blocker-on-the-command-line-with-git
How to solve gitlab merge blocker on the command line with git? - Stack Overflow
January 11, 2022 - It's the correct start (although I recommend that users not use git pull, but rather break this into two separate commands, git fetch and then either rebase or merge depending on which one they intend). However, you will (almost always) get conflicts when you do this, and you must follow through by resolving those conflicts. Git is a tool, not a solution. ... Once you have resolved the conflicts, you will need to use git push --force to update your merge request.
🌐
Read Medium
readmedium.com › gitlab-merge-blocked-fast-forward-merge-is-not-possible-7f86bf79e58b
GitLab: Merge blocked: fast-forward merge is not possible.
This occurs when you are using fast-forward merges. Usually, you can rebase directly from the Merge Request in GitLab, unless there is a merge conflict. In that case, you can’t do that through the UI and get this message: The first step is to clone the repository on your computer and to go ...
🌐
DEV Community
dev.to › saint_vandora › mastering-git-resolving-not-possible-to-fast-forward-aborting-error-1pac
Mastering Git: Resolving "Not Possible to Fast-Forward, Aborting" Error - DEV Community
January 11, 2024 - This error signals that Git cannot automatically merge the changes, and manual intervention is required to resolve the divergence between local and remote branches. 1.Fetch the Changes: Start by fetching the changes from the remote repository ...
🌐
GitHub
github.com › go-gitea › gitea › issues › 35175
Cannot merge using "Rebase and fast-forward" when requiring signed commits · Issue #35175 · go-gitea/gitea
July 28, 2025 - The only merge strategy allowed on the repository is "Rebase and fast-forward", meaning that no extra commits are to be created when merged, just fast forward the main branch to the HEAD of the branch being merged (I like this strategy to keep ...
Author   go-gitea
🌐
Berkeleytime
berkeleytime.com › git › help › user › project › merge_requests › fast_forward_merge.md
Fast forward merge · Merge requests · Project · User · Help
Berkeley's online course discovery platform. Berkeleytime is a platform built, maintained, and run by students, just like you.
🌐
Drupal
drupal.org › docs › develop › git › using-gitlab-to-contribute-to-drupal › rebase-a-merge-request
Rebase a merge request | Using GitLab to contribute to Drupal | Drupal Wiki guide on Drupal.org
January 13, 2026 - If the above automated rebase is not possible you can resolve conflicts via the UI. Alternatively, you can perform the rebase locally: Fetch the changes from the base repository: git fetch origin · Make sure the base branch is up to date. For example, this might be 9.4.x on Drupal core.
🌐
GitLab
gitlab.lcqb.upmc.fr › help › user › project › merge_requests › fast_forward_merge.md
Fast forward merge · Merge requests · Project · User · Help
Now, when you visit the merge request ... merge is possible. If the target branch is ahead of the source branch, you need to rebase the source branch locally before you will be able to do a fast-forward merge....
🌐
Reddit
reddit.com › r/gitlab › help needed: merge requests without rebasing?
Help needed: merge requests without rebasing? : r/gitlab
December 8, 2025 - Sorry, this post was deleted by the person who originally posted it. Share ... Pretty sure that even without conflicts, if strategy is set to "fast forward only" in GitLab, you do have to rebase to be able to merge.
🌐
GitLab
forum.gitlab.com › general
Merge request fast-forward if possible - General - GitLab Forum
December 8, 2021 - Hello, if I understand the settings correctly I can force fast forward merges for my project but there is not an option to do fast-forward when it is possible. For me it would be eg. single commit merge request which ca…