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

1 points
Asked by:

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

After I made git pull I got some conflicts.


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.

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 answer
2 points
Answered by:

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
Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂