2012-11-30 41 views
0
45825ae 112 min ago Mike  fix bug  master(Blue's conflicted copy 2012-11-30) 
1ba982c 2 hours ago Mike  update doc 

3fbc637 4 hours ago Mike  fix ui bug  master 
193b99e 5 hours ago Mike  fix model bug 

以上是我的git回购的短名单。从我的项目运行git状态显示:不允许Git推送:如何解决这个问题?

# On branch master 
# Your branch is ahead of 'origin/master' by 1 commit. 
# 
nothing to commit (working directory clean) 

如果我跑推,它会给我:

http://localhost/myproject.git: push not permitted 

任何想法?

编辑:当我尝试重新克隆我的项目,它给了我:

fatal: Reference has invalid format: 'refs/heas/master(Blue's conflicted copy 2012-11:30)' 
+0

也许这可能有所帮助:http://stackoverflow.com/questions/2888029/how-to-push-a-local-git-repository-to-another-computer – spinningarrow

+0

感谢您的链接,但我不能明白它与我的问题有何关系。 – Mike

回答

0

也许你正在使用错误的URL来推动?通常你推送到SSH URL和HTTP只用于拉。

如果你想推送到HTTP,你需要运行git-http-backend,启用http.receivepack或使用验证,否则后端将拒绝推送,因为你看到它。有关更多详细信息,请参见man page

+0

这是我本地的回购,我用http推送。 – Mike

+0

我已经更新了我的答案,以涵盖HTTP推送设置。 –