[英]git push rejected non-fast-forward
I have about 40,000 lines of C++ code in 12 projects. 我在12个项目中有大约40,000行C ++代码。 Each project has a different git.
每个项目都有不同的git。 I have shell script which make the installation of my software, put the NoSQL database, create directories etc. It creates also a source directory for every project.
我有shell脚本,它可以安装我的软件,放入NoSQL数据库,创建目录等。它还为每个项目创建一个源目录。 I use the clone “git clone”
我用克隆“git clone”
The problem: 问题:
When I have a change and make a local “commit” I cannot “push” in my main repository, Due to “ git push rejected -non -fast forward ”... I am the only one who has access to the files. 当我进行更改并进行本地“提交”时,我无法在主存储库中“推送”,由于“ git push rejected -non -fast forward ”...我是唯一可以访问这些文件的人。 So it is not possible “The push is failing because my refs are behind those of the remote repository.”
所以不可能“推送失败,因为我的参考文件落后于远程存储库。”
PS The Operating system is Linux/Ubuntu PS操作系统是Linux / Ubuntu
edit 1 编辑1
local 本地
git log --graph --pretty=oneline –abbrev-commit
* 5e540fd Founder initial commit ver 2
main 主要
git log --graph --pretty=oneline –abbrev-commit
* 74acd89 Founder initial commit
edit 2 编辑2
I just done everything using CLI instead of the eclipse. 我刚刚使用CLI而不是eclipse完成了所有事情。 So manually I have no problems
所以手动我没有问题
main 主要
git log --graph -–oneline
* 45f84ae ver 2
* 74acd89 Founder initial commit
clone 克隆
git log --graph --oneline
* 45f84ae ver 2
* 74acd89 Founder initial commit
In the first place (edit 1) I was using the eclipse in order to make a) the local commit and b) the push 首先(编辑1)我使用eclipse来进行a)本地提交和b)推送
Now I was use the terminal and it is working as a charm, but I don't understand yet the problem with eclipse 现在我使用终端,它正在作为一个魅力,但我还不明白eclipse的问题
PS PS
I can not add the eclipse tag :-( 我无法添加eclipse标签:-(
I had the bad habit to press the “commit amend” button because i wanted to have the previous commit message. 我有一个坏习惯,按下“提交修改”按钮,因为我想要有前一个提交消息。 I didn't realize that I actual made a amend... Now Everything work as a charm.
我没有意识到我实际上做了修改......现在一切都像一个魅力。
Thank everybody for the help :-) 感谢大家的帮助:-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.