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