Top community members
All Questions Ask Question

In the past we had a dream,
to have place where we could share IT knowledge,
to ask questions without fear that someone will judge us.

Now we are a group of people who make this dream come true. ❤ 💻

If you think sharing knowledge and helping other is valuable.

join our community - Click here

Hard reset with pull is not working - git merge conflict (modify/delete/content merge)

1 answers
1 points

I have got task to make code review and I am newbies in git.

After I made git pull I got some conflicts.

Console:

dony@ubuntu-pc:/home/dony/Projects/open-library$ git pull
Removing src/pages/login.tsx
Removing src/modules/login/test/index.test.tsx
CONFLICT (modify/delete): src/modules/login/index.tsx deleted in 95deb238d766586cee8780d54b6f13931d06f5ba and modified in HEAD. Version HEAD of src/modules/login/index.tsx left in tree.
Removing src/components/table.tsx
Auto-merging src/layout/mainLayout.tsx
CONFLICT (content): Merge conflict in src/layout/mainLayout.tsx
Automatic merge failed; fix conflicts and then commit the result.
dony@ubuntu-pc:/home/dony/Projects/open-library$

As I suppose it happened becasue someone changed git history.

I have created this branch and after first push, job was continued by some member from my team.

I have tried to make git clean -fd with git reset --hard and later git pull again but it is not working. Conflicts are there still. 

 

1 answers
2 points

If you want to reset all repository to remote state run following commands:

git fetch --all
git reset --hard origin/your_local_branch_name

And chack it now with:

git pull

Problen was describeed here too.

0 comments Add comment

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more