problem arising with git revert causes merge conflict

i have a text file with the following content:

initially:
hello

first commit:
hello
asdfasdf

second commit:
hello
test

third commit:
hello
test
test2

now i want to revert to the second commit , but i am getting a merge conflict why ?

Hey there @masterinex,

Do you have any local changes that you haven’t committed yet? Also, have you tried to push your current version (after committing any changes) or pull the remote?

You might also find this free GitHub Learning Lab (a platform made by GitHub to help get you set up with Git and GitHub for free) course interesting: https://lab.github.com/githubtraining/managing-merge-conflicts

Let me know!