How to resolve git conflict
git conflict revert
First of all, I would like to say that I don’t know much about git. I started using git from last week onwards and I could resolve a git conflict in the following way:
- Identify the conflicted files.
- Go to the folder of the files conflicted.
- Take a backup of the files.
- Then use the below command to replace the files conflicted with most recent git commit:
git checkout HEAD -- filename # the version from the most recent commit
git checkout HEAD^ -- filename # the version before the most recent commit
- Update the files with the changes made earlier and commit.
- Problem solved. Be Happy :lol:!!