简体   繁体   English

Atom Git加困难

[英]Atom git-plus difficulties

I'm trying to set up atoms git-plus package and have gone through what I think is appropriate setup steps and can't push files to my github account. 我正在尝试设置原子git-plus软件包,并经历了我认为适当的设置步骤,并且无法将文件推送到我的github帐户。 Using git config, I've configured user.email and user.name and made sure that they reflect my account and email address in Github 使用git config,我已经配置了user.email和user.name并确保它们在Github中反映了我的帐户和电子邮件地址

I get an error message: 我收到一条错误消息:

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.

The new repo is a test one created just now. 新的仓库是一个刚刚创建的测试。 I have tried a git pull followed by an attempt to push it through git-plus. 我尝试了git pull,然后尝试通过git-plus进行推送。 I've tried to delete the local copy and create it again by cloning. 我试图删除本地副本,然后通过克隆再次创建它。 I can push the file using the terminal. 我可以使用终端推送文件。 I don't know enough about version control to know what to do next. 我对版本控制了解不多,不知道下一步该怎么做。 Any thoughts? 有什么想法吗?

For anyone out there who was as confused as I was re: what is happening. 对于那些像我一样困惑的人:发生了什么。

I fixed this by specifying my git pull message to the name and branch. 我通过在名称和分支中指定我的git pull消息来解决此问题。 This merged whatever file was causing the issue and then my push from git-plus worked fine. 这合并了引起问题的任何文件,然后我从git-plus推送的工作正常。

As I understand it (and please those that know what they're talking about here correct me when I bork it up) 据我了解(请那些知道他们在说什么的人在我提出建议时纠正我)

the git pull should read git pull应该读

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

I was typing in git pull and not understanding you need to specify where you are trying to merge. 我在git pull中输入内容,但不了解您需要指定要合并的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM