【发布时间】:2015-01-23 03:10:40
【问题描述】:
从昨天开始,我的专业电脑出现了一个大问题:我无法使用git pull。这真的很奇怪,因为其他所有 git 命令都有效。
我尝试了什么:
- 正在重新安装 Github for Windows、Git Shell 等...
- 看看我能不能访问远程服务器(git push 工作,我可以ping 远程服务器)。
GIT_TRACE=1 git pull返回:
$ GIT_TRACE=1 git pull
trace: exec: 'git-pull'
trace: run_command: 'git-pull'
还有一点很奇怪:现在在 git 存储库上,我没有在 git shell 上看到当前存储库:
MY_USER@MY_COMPUTER /c/Github/myRepo
$
通常,我的 CLI 如下所示:
MY_USER@MY_COMPUTER /c/Github/myRepo <develop>
$
我认为问题出在软件上,因为在问题出现之前我获得了“企业”软件包更新。 我的配置:Windows 8.1 Professional 和 Github for Windows,我正在使用 Git shell。
如果有人有解决此问题的想法或如何调试此命令,我将不胜感激。
编辑
git remote -v 返回:
$ git remote -v
origin https://MY_USER@git-SI.enterprise.fr/PROJECT/windows/PROJECT_repo.git (fetch)
origin https://MY_USER@git-SI.enterprise.fr/PROJECT/windows/PROJECT_repo.git (push)
git statusreturns:
$ git status
# On branch develop
# Your branch is ahead of 'origin/develop' by 1 commit.
# (use "git push" to publish your local commits)
#
nothing to commit, working directory clean
【问题讨论】:
-
git remote -v和git status在/c/Github/myRepo中返回什么? -
@VonC 我在帖子中回答你。
-
你使用的是最新的 Git for windows 1.9.4 吗?
git fetch工作吗? -
是的,
git fetch有效 -
如果是“
your branch is ahead of 'origin/develop' by 1 commit”,就没有什么可以拉的,只有推。你试过推吗?