【问题标题】:git pull error when trying to deploy to AWS EC2尝试部署到 AWS EC2 时出现 git pull 错误
【发布时间】:2015-07-04 09:36:57
【问题描述】:

我正在尝试将一些新代码行从我的存储库提交到 Aws。我在 Github 上同步了所有内容。尝试从我的存储库拉取到 EC2 实例。

我通过 ssh 连接到我的 EC2,这里没有问题,但是当我执行 "git pull"(并输入我的 github 用户名和密码)时,我得到一个提示:

"You are not currently on a branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch>".

更新: 我在'git pull' 之前尝试了'git checkout master',但它被EC2 搞砸了,网站因这些错误而关闭-'Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm &lt;file&gt;' as appropriate to mark resolution, or use 'git commit -a'

感谢您的帮助!

【问题讨论】:

    标签: git amazon-web-services amazon-ec2 git-pull pull


    【解决方案1】:

    试试git checkout -b &lt;your_branch&gt;,你的本地Git现在好像没有在任何分支上工作。

    【讨论】:

    • 使用“-b”,您正在创建一个具有给定名称的新分支,而解决方案可能只是签出现有分支...
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-08
    • 1970-01-01
    • 2019-12-16
    • 1970-01-01
    • 2020-03-21
    • 2015-01-21
    相关资源
    最近更新 更多