Atom git-plus difficulties

折月煮酒 提交于 2019-12-12 03:09:55

问题


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. Using git config, I've configured user.email and user.name and made sure that they reflect my account and email address in 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. 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?


回答1:


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. This merged whatever file was causing the issue and then my push from git-plus worked fine.

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 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.



来源:https://stackoverflow.com/questions/39108733/atom-git-plus-difficulties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!