V
V
Vladimir Petrov2019-09-02 21:30:40
git
Vladimir Petrov, 2019-09-02 21:30:40

How to solve git pull error and conflict?

There is a branch in the repository. I did a git pull from it to my computer. Made changes locally. At this time, another person made his changes and did a git push to the same branch.
As a result, I made a commit (git commit) and am trying to do a git push. But it doesn't work for me, git asks me to do a git pull first. At the same time, git pull also fails.
How to resolve this conflict? I need to make changes to a branch

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
iMaximus, 2019-09-02
@Tozh

When you did a git pull you had uncommitted changes. You need to resolve conflicts and make a commit. After that, you can safely do a push. Nobody will solve the conflict for you, you need to look at the code and choose whose changes to leave or leave everything.

S
Shane Matte, 2019-09-02
@mattedev

First you commit the changes, then you merge the code from the repository and push

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question