第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

解決Git合并沖突以利于拉動(dòng)期間的更改

解決Git合并沖突以利于拉動(dòng)期間的更改

Git
HUH函數(shù) 2019-10-23 15:18:02
我該如何解決git merge沖突以利于更改?基本上,我需要從工作樹(shù)中刪除所有有沖突的更改,而不必git mergetool在保持所有無(wú)沖突更改的同時(shí)進(jìn)行所有沖突。最好在拉動(dòng)時(shí)這樣做,而不是在之后。
查看完整描述

3 回答

?
三國(guó)紛爭(zhēng)

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊

您可以使用遞歸“他們的”策略選項(xiàng):


git merge --strategy-option theirs


從男人:


ours

    This option forces conflicting hunks to be auto-resolved cleanly by 

    favoring our version. Changes from the other tree that do not 

    conflict with our side are reflected to the merge result.


    This should not be confused with the ours merge strategy, which does 

    not even look at what the other tree contains at all. It discards 

    everything the other tree did, declaring our history contains all that

    happened in it.


theirs

    This is opposite of ours.

注意:正如手冊(cè)頁(yè)所述,“我們的”合并策略選項(xiàng)與“他們的”合并策略非常不同。


查看完整回答
反對(duì) 回復(fù) 2019-10-23
?
HUX布斯

TA貢獻(xiàn)1876條經(jīng)驗(yàn) 獲得超6個(gè)贊

git pull -s recursive -X theirs <remoterepo or other repo>

或者,簡(jiǎn)單地,對(duì)于默認(rèn)存儲(chǔ)庫(kù):


git pull -X theirs

如果您已經(jīng)處于沖突狀態(tài)...


git checkout --theirs path/to/file


查看完整回答
反對(duì) 回復(fù) 2019-10-23
?
慕桂英3389331

TA貢獻(xiàn)2036條經(jīng)驗(yàn) 獲得超8個(gè)贊

如果您已經(jīng)處于沖突狀態(tài),并且只想接受他們所有的狀態(tài):


git checkout --theirs .

git add .

如果要執(zhí)行相反的操作:


git checkout --ours .

git add .

這太劇烈了,因此請(qǐng)確保您確實(shí)要在執(zhí)行此操作之前先將所有內(nèi)容清除掉。


查看完整回答
反對(duì) 回復(fù) 2019-10-23
  • 3 回答
  • 0 關(guān)注
  • 557 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)