如何使用 git 取得合併清單?

如何使用 git 取得合併清單?

當我嘗試合併文件時,我得到

$ git merge origin/develop
Removing t/table_statistic_grains_test.t
Removing t/table_statistic_grains_calllog.t
Removing t/table_statistic_grains_accession.t
Auto-merging t/table_donor_document.t
Auto-merging install.sh
CONFLICT (content): Merge conflict in install.sh

然而,當我丟失該列表並嘗試完成合併時,我得到的只是,

$ git merge
error: 'merge' is not possible because you have unmerged files.
hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: Exiting because of an unresolved conflict.

--abort我如何在不嘗試重新的情況下取回該清單merge

答案1

在“install.sh”檔案上使用 git mergetool 或在編輯器中編輯它以嘗試手動合併檔案。之後,您應該將合併的文件新增至索引並提交。現在你應該有機會做其他事情。

git mergetool install.sh
git add install.sh
git commit -a

相關內容