I use Git, and I know that:
git revert <hash-code>
is used to create a new commit that will be identical to the past commit in the hash-code.
For example, I have the following commits:
1f74a0e second commit
e72d8b8 first commit
I wanted to revert the first commit, so I used:
git revert 1f74a0e
Still, I got the following error:
error: could not revert 1f74a0e... first commit hint: after resolving the conflicts, mark the corrected paths hint: with 'git add ' or 'git rm ' hint: and commit the result with 'git commit'
As for the conflicts, I type:
$ git diff --name-only --diff-filter=U
file.txt
When I open file.txt I see no signs for conflicts.
Of course there will be conflicts. I expect git to take the "first commit" and copy it on top of the second commit. How can I do it?