问题描述
我有一个live http服务器。我在服务器主目录库中创建了一个存储库:
〜> git init
〜> git add index.php
〜> git添加文件
〜> git commit
我使用eclipse将文件检入我的本地机器。
这些文件都在我的本地机器中,并且在Eclipse中受到版本控制。
当我尝试提交我的修改(提交和推送)我得到以下错误:
master:master [reject - non-fast-forward]
$ b 任何想法为什么?
解决方案我注意到您在服务器上初始化了一个非裸机。通常情况下,git将阻止您推送这样一个非裸机的回购。你可以尝试没有Eclipse,看看你的错误是否改变?
I have a live http server.
I created a repository on the server home repository:
~ > git init .
~ > git add index.php
~ > git add files
~ > git commit
I checked out the files into my local machine using eclipse.The files are all in my local machine and are under version control in Eclipse.
When I try to commit my modifications ("commit and push") I get the following error:
master:master [rejected - non-fast-forward]
Any idea why?
Thank you.
解决方案 I notice you initialized a non-bare repo on the server. Normally, git will prevent you from pushing to a non-bare repo like that. Can you try without Eclipse and see if your error changes?
这篇关于无法将内容推送到远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!