紅色 網(wǎng)站配色seo優(yōu)化方式
git提交時(shí)出現(xiàn)merge branch main of xxx
原因:
1、同事commit了一個(gè)修改A,push到remote
2、我把這個(gè)修改直接pull了下來(pull是fetch+merge的操作,自動(dòng)合并到本地workspace)
3、同事因?yàn)楹罄m(xù)的commit有沖突,把A這個(gè)commit回退了,然后合并到了B、C上,又commit了B、C這兩個(gè)變更
4、我再做pull的時(shí)候,就會(huì)有merge branch main of xxx的提示
就是說本地commit了A這個(gè)變更,而remote只有B、C變更,pull的時(shí)候合并有沖突,要再commit一次
解決:
1、在show log里面,跳到commit A修改之前的版本,右鍵選擇Reset "main" to this,然后選擇Hard
2、再pull就可了
?