How I resolved git error — “fatal: Not possible to fast-forward, aborting”.
I was trying to make a pull request from git and I received this message — “fatal: Not possible to fast-forward, aborting”.
A team member had made a commit and I couldn’t pull the code.
How I resolved it?
After a bit of research I figured the solution online by running this command.
git pull origin --rebase
git pull rebase
is a git command is used to update a local branch with the changes from a remote branch. It incorporates changes from the remote branch into the local branch by applying each remote commit on top of the local branch's commits. This command is useful when you want to keep your local branch's history linear and avoid creating merge commits.
git pull request
: is a git command is used to request that a branch be merged into another branch. This is often used in collaborative development where multiple developers work on different branches and then request that their changes be merged into a main branch. When a pull request is made, the changes in the branch are reviewed, tested, and approved before being merged into the target branch.
Kraken explains this better, you can read about it here.
Hope this article was helpful to you.
Happy coding.