Atom git-plus困难

时间:2016-08-23 18:54:54

标签: git github atom-editor

我试图设置原子git-plus包,并且已经完成了我认为合适的设置步骤,并且无法将文件推送到我的github帐户。使用git config,我已经配置了user.email和user.name,并确保它们反映了我在Github中的帐户和电子邮件地址

我收到错误消息:

To https://github.com/etc.
![rejected] HEAD -> master (fetch first)
error: failed to push some refs to https://github.com etc.
Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want o first integrate the remote changes e.g. git pull before pushing again.

新的回购是刚刚创建的测试版。我尝试过git pull,然后尝试通过git-plus推送它。我试图删除本地副本并通过克隆再次创建它。我可以使用终端推送文件。 我对版本控制知之甚少,不知道接下来该做什么。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

对于那些像我一样困惑的人:发生了什么。

我通过将git pull消息指定给名称和分支来修复此问题。这合并了导致问题的任何文件,然后我从git-plus推送工作正常。

据我所知(并且请那些知道他们在这里谈论什么的人在我把它搞砸时纠正我)

git pull应该读

git pull origin (which is the alias of your remote repository) master (which is the branch you're pulling from)

我正在输入git pull而不理解您需要指定您尝试合并的位置。