1) I add empty file.txt to the git folder:
git add .
git commit --m "Commit Inicial"
2) Edit file.txt:
||||
A
||||
git add .
git commit --m "Commit A"
3) Edit file.txt:
||||
A
B
||||
git add .
git commit --m "Commit B"
4) Edit file.txt:
||||
A
B
C
||||
git add .
git commit --m "Commit C"
5) I return to "Commit B":
git revert "Commit B" (aquí realmente va el código que genera)
By doing this, you answer the following:
error: could not revert cfa98f7 ... Upload Commit B hint: after resolving the conflicts, mark the corrected paths hint: with 'git add 'or' git rm 'hint: and commit the result with' git commit '
I look at the contents of file.txt and the following appears:
A
<<<<<<< HEAD
B
C
=======
>>>>>>> parent of cfa98f7... Subida Commit B
I understand that you inform me of a conflict between the lines but I do not understand anything.
Should not I simply return the file to the state it was in Commit B?
Thank you very much.