git 冲突覆盖_git pull冲突解决之强制覆盖
今天在更新git本地倉庫時發生了奇怪的沖突,想說一下這個問題的解決辦法。
本地倉庫工作目錄中并沒有未提交的修改,很干凈,這時我想更新到遠程倉庫最新的狀態,所以執行了git pull命令,結果發生了Conflict:
'''
$ git pull
remote: Enumerating objects: 391, done.
remote: Counting objects: 100% (391/391), done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 387 (delta 170), reused 283 (delta 128)
Receiving objects: 100% (387/387), 267.25 MiB | 917.00 KiB/s, done.
Resolving deltas: 100% (170/170), completed with 3 local objects.
From https://e.coding.net/weidongshan/01_all_series_quickstart
2ea4337..fa84f29 master -> origin/master
[new tag] V2.4 -> V2.4
[new tag] V2.1 -> V2.1
[new tag] V2.2 -> V2.2
[new tag] V2.3 -> V2.3
Performing inexact rename detection: 100% (499086/499086), done.
CONFLICT (rename/rename): Rename directory 05_臨時文件裸機文檔程序眾包/100ASK_IMX6ULL裸機程序/001_led->05_100ASK_IMX6ULL裸機程序/10異常與中斷/008_exception in HEAD. Rename directory 05_臨時文件裸機文檔程序眾包/100ASK_IMX6ULL裸機程序/001_led->10裸機開發/01_100ASK_IMX6ULL裸機程序/4_led in fa84f29a7a0ef0d5637a1309d057cd1f9aa630da
Auto-merging 更新記錄.txt
CONFLICT (content): Merge conflict in 更新記錄.txt
CONFLICT (modify/delete): 嵌入式Linux應用開發完全手冊第2版韋東山全系列視頻文檔全集.pdf deleted in fa84f29a7a0ef0d5637a1309d057cd1f9aa630da and modified in HEAD. Version HEAD of 嵌入式Linux應用開發完全手冊第2版韋東山全系列視頻文檔全集.pdf left in tree.
CONFLICT (rename/delete):
......
'''
感覺很奇怪,后來想了想,應該是太久沒更新了,有些目錄發生了變更,導致merge的時候沖突了。具體原因就不深究了,下面說一下解決方案:
git fetch origin master
先把遠程倉庫最新狀態拉到本地(以master為例);
git reset --hard origin/master
將本地倉庫重置到遠程倉庫最新狀態(本地將被覆蓋)。
以上~~~
總結
以上是生活随笔為你收集整理的git 冲突覆盖_git pull冲突解决之强制覆盖的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: matlab绘图z=sin(x_「mat
- 下一篇: echarts label加边框_玩转E