我正在关注Dan Eden 的 Github 工作流程指南。尝试从远程将我的更改推送到 Github 时,我遇到了一个问题,使用git push -u origin master
. 我已将所有文件添加到舞台并提交它们,当我使用上面的命令时,它会返回:
To git@github.com:tomoakley/5-lines.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:tomoakley/5-lines.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
git pull
因此,正如它所建议的那样,我尝试使用它,它会返回:
git: 'pull' is not a git command. See 'git --help'.
Did you mean this?
shell
我已经联系了我的两个网络主机,他们说这不是 Git 安装的问题,而是我的 ssh 密钥的问题(使用ssh -T git@github.com
带有正常身份验证消息的返回),所以不可能这样。我还联系了 Github,目前正在调查中。Github 支持人员告诉我使用我现在正在做的SSH 代理转发。
关于我的服务器和 git 的一些细节:
git --version
: git 版本 1.7.12git --exec-path
:/usr/local/libexec/git-core
感谢任何回答的人:)