英文 ▾
主題 ▾
最新版本 ▾ git-merge-index 最後更新於 2.35.0
git-merge-index 手冊的變更
設定與配置
取得與建立專案
基本快照
分支與合併
分享與更新專案
檢查與比較
修補
除錯
電子郵件
外部系統
伺服器管理
指南
管理
底層命令
- 2.35.1 → 2.47.0 無變更
-
2.35.0
01/24/22
- 2.24.1 → 2.34.8 無變更
-
2.24.0
11/04/19
- 2.1.4 → 2.23.4 無變更
-
2.0.5
12/17/14
描述
這會在索引中查找 <file>(s),如果存在任何合併條目,則將這些檔案的 SHA-1 雜湊值作為參數 1、2、3 傳遞(如果沒有檔案,則為空參數),並將 <file> 作為參數 4 傳遞。三個檔案的檔案模式將作為參數 5、6 和 7 傳遞。
選項
如果使用多個 <file> (或 -a) 呼叫 *git merge-index*,則它會依序處理它們,僅在合併返回非零退出碼時停止。
通常,這是透過一個腳本呼叫 Git 模仿 RCS 套件的 *merge* 命令來執行的。
發行版中包含一個名為 *git merge-one-file* 的範例腳本。
警告 警告 警告!Git「合併物件順序」與 RCS *merge* 程式的合併物件順序不同。在上述排序中,原始物件排在第一位。但是 3 向合併程式 *merge* 的參數順序是將原始物件放在中間。別問我為什麼。
範例
torvalds@ppc970:~/merge-test> git merge-index cat MM This is MM from the original tree. # original This is modified MM in the branch A. # merge1 This is modified MM in the branch B. # merge2 This is modified MM in the branch B. # current contents
或
torvalds@ppc970:~/merge-test> git merge-index cat AA MM cat: : No such file or directory This is added AA in the branch A. This is added AA in the branch B. This is added AA in the branch B. fatal: merge program failed
後一個範例顯示當任何內容返回錯誤時,*git merge-index* 如何停止嘗試合併(即,cat
針對 AA 檔案返回錯誤,因為它在原始檔案中不存在,因此 *git merge-index* 甚至沒有嘗試合併 MM 東西)。
GIT
屬於 git[1] 套件的一部分