0

I worked on a branch some time ago, I have pushed the code to remote also. But due to some other requirements it is not merged to main branch. Now multiple new merges happened with main branch.

I need to make some changes to my previous code. How can I work on my already existing branch and create a pull request. Whenever I try to pull the code from main into main branch, it gives me below error.

fatal: Not possible to fast-forward, aborting.

Sachin M S
  • 49
  • 7
  • 2
    Possibly : https://stackoverflow.com/questions/13106179/fatal-not-possible-to-fast-forward-aborting – checked May 05 '22 at 08:52

1 Answers1

0

I found below steps as solution: In your feature branch

git fetch --all

git pull origin destination_branch --rebase

Sachin M S
  • 49
  • 7
  • 1
    You don't need a separate `git fetch` step and you definitely don't want `git fetch --all` here. It's not *harmful*, it's just pointless. – torek May 06 '22 at 00:13