1.error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use ‘git add/rm ’
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
问题原因:
解决办法:git reset --hard FETCH_HEAD 使用此命令放弃本地文件修改
2.fatal: could not read Username for ‘https://xxxxx’: terminal prompts disabled
问题原因:表示 Git 在尝试通过 HTTPS 克隆或访问 git.xiaojukeji.com 时需要用户名,但终端输入被禁用
解决办法:使用凭据存储
然后下次访问时输入用户名和密码,它会被存储在 .git-credentials 文件中
git config --global credential.helper store
3.物理机上更换git密码后,git pull报错
remote: The project you were looking for could not be found.
解决办法:rm -rf ~/.git-credentials
再次git pull会输入用户名和密码即可
4.mac上更换git 密码后,git pull没有权限
删除现有凭证缓存:
git config --global --unset credential.helper
重新设置凭证缓存:
git config --global credential.helper cache
再次git pull 会让你重新输入用户名和密码