1

I want to revert some commit. but, when the conflict is occurred, can i use tool for solve conflict?

I temporary using git mergetool, but it create .orig files. There is any other commands to solve it?

When i using git mergetool. The situation is as follow.

$ git revert 96d95b
error: could not revert 96d95b4... <commit name>
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'
$ git mergetool
Merging:
1.txt
2.txt

Normal merge conflict for '1.txt':
  {local}: modified file
  {remote}: modified file

Normal merge conflict for '2.txt':
  {local}: modified file
  {remote}: modified file
$ git status
On branch master
You are currently reverting commit 96d95b4.
  (all conflicts fixed: run "git revert --continue")
  (use "git revert --abort" to cancel the revert operation)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   1.txt
        modified:   2.txt

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        1.txt.orig
        2.txt.orig
$ git revert --continue
[master 7a4f46b] Revert "commit message"
 2 files changed, 2 deletions(-)
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        1.txt.orig
        2.txt.orig

nothing added to commit but untracked files present (use "git add" to track)

Finally, i manually delete .orig files. (As i know, those file is automatically deleted when use git merge)

H.YK
  • 57
  • 7

0 Answers0