-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
1. 拉取合并代码时候报错
场景描述: 当面拉取远程分支并合并(git pull)的时候,如果遇到删除文件、重命名文件或者其它意外操作导致合并中断并报错:Git Pull Failed:You have not concluded your merge.Exiting because of unfinished merge。
这里提供两种方案:
- 舍弃本地代码,远程版本覆盖本地版本
git fetch --all
git reset --hard {remote_name}/{branch_name}
git pull
- 保留本地代码,中止合并->重新合并->重新拉取,这种做法需要处理代码冲突
git merge --abort
git reset --merge
git pull
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels