I have a simple index.txt file, and I have committed after writing each line:
one
two
three
These are my commits:
19b1a80 (HEAD -> master) commit three
0305c8a commit two
f534357 commit one
But when I'm trying git revert 0305c8a
I'm getting this message:
Auto-merging index.txt
CONFLICT (content): Merge conflict in index.txt
error: could not revert 0305c8a... commit two
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
I have recently started learning git, I have tried this many times with different codes but I'm not getting why this doesn't work.