Home > other >  git pull origin main return * branch main FETCH_HEAD Already up to date
git pull origin main return * branch main FETCH_HEAD Already up to date

Time:01-30

I want to push my changes i have made in the app but when i run: git pull origin main it's give this message:

* branch            main       -> FETCH_HEADAlready up to date. 

when I visit my profile nothing is change, when I come back to my code I see some code like this:

 <<<<<<< HEAD 

in each file I click on, how can I solve that please

CodePudding user response:

You are having merge conflicts, so you need to resolve them first. Basically someone in master changed the same code as you did in your branch, so git does not know what change to keep.

So you need to decide what change to keep: The change in master (i.e. foo = 1 -> foo = 2), the change in your branch (i.e. foo = 1 -> foo = 3) or a combination of both (i.e. foo = 1 -> foo = 4). There are a lot of tutorials on how to do that with git. Stackoverflow also contains many questions regarding solving merge conflicts in git, i.e. How to resolve merge conflicts in a Git repository?

  •  Tags:  
  • Related