尝试部署到AWS EC2时出现git pull错误

时间:2015-04-25 20:15:23

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

我正在尝试从我的存储库向Aws提交一些新的代码行。我在Github上同步了一切。尝试从我的存储库拉到EC2实例。

我进入我的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 checkout master'之前尝试了'git pull',但是EC2搞砸了,网站因这些错误而失败 - 'Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm <file>' as appropriate to mark resolution, or use 'git commit -a&#39;

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

试试git checkout -b <your_branch>,您的本地Git现在似乎并未在任何分支机构中工作。