You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Git Pull执行完全卡住(Git 2.13.5/Apple Git-94)求助

Troubleshooting Stuck git pull in Git 2.13.5 (Apple Git-94)

Hey there, let’s work through this stuck git pull issue you’re facing. Older Apple-distributed Git versions like 2.13.5 (Git-94) can have quirky behavior with connections or local state, so here’s a step-by-step approach to fix it:

1. First, terminate the stuck Git process

If git pull is frozen, hit Ctrl+C to kill the running command. If that doesn’t work, open a new terminal window and run:

ps aux | grep git

Look for the git pull or related Git processes, note their PID numbers, then terminate them with:

kill <PID_NUMBER>

2. Diagnose the root cause with verbose fetch

git pull combines git fetch and git merge, so isolating the fetch step can tell you if the issue is network-related or a merge problem. Run:

git fetch --verbose
  • If this hangs too: The problem is likely a network connection issue with your remote repository.
  • If this completes successfully: The issue is with the merge step, which we’ll address later.

3. Fix network connection issues

If git fetch hangs, try these checks:

  • Test SSH connectivity (if you use SSH for repo access):
    ssh -T git@<YOUR_REPO_HOST>  # e.g., git@github.com
    
    You should get a friendly confirmation message if the connection works. If not, check your SSH keys or firewall settings.
  • Check for proxy interference: Older Git versions can misbehave with proxies. Run these commands to see if a proxy is configured:
    git config --global --get http.proxy
    git config --global --get https.proxy
    
    If output returns a proxy URL, unset them temporarily:
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
  • Test HTTPS connectivity (if using HTTPS):
    curl -v https://<YOUR_REPO_URL>
    
    This will show you if the remote server is reachable and if there are SSL or redirect issues.

If git fetch works but git pull still hangs, the issue is likely with the merge step:

  • Run merge manually: Instead of using git pull, execute the two steps separately:
    git fetch origin
    git merge origin/<YOUR_BRANCH_NAME>  # e.g., origin/main
    
    If there are merge conflicts, Git will prompt you to resolve them instead of hanging.
  • Check for stale lock files: Sometimes a previous failed operation leaves a lock file. Delete it with:
    rm -f .git/index.lock
    

5. Clean up local Git state

Older Git versions can accumulate stale objects that cause hangs. Run this to clean up:

git gc --prune=now

This removes unreachable objects, optimizes the repository, and clears cached connections.

Apple’s bundled Git 2.13.5 is quite outdated (released in 2017). Many connectivity and stability issues have been fixed in newer versions. If you can, install a newer Git via Homebrew:

brew install git

Then verify the new version is active:

git --version

Start with the earliest steps and work your way down—most stuck git pull issues in this version are either network-related or stale local state problems.

内容的提问来源于stack exchange,提问作者Abraham Gnanasingh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:27:55