2012-05-23 80 views
0

我的git项目出现了一个奇怪的错误。Git推送,状态问题

[email protected] ~/android/system/system/core $ git push [email protected]:android.git/platform/system/core.git gingerbread-release-om 
Everything up-to-date 
[email protected] ~/android/system/system/core $ git status 
# On branch gingerbread-release-om 
# Your branch is ahead of 'development/gingerbread-release-om' by 1 commit. 
# 
nothing to commit (working directory clean) 
[email protected] ~/android/system/system/core $ 

有没有人知道为什么会发生这种情况?

编辑:

[email protected] ~/android/system/system/core $ git remote -v 
development  [email protected]:android/platform/system/core (fetch) 
development  [email protected]:android/platform/system/core (push) 

回答

1

编辑2:(我不能回答我的问题还)

好吧,我现在知道的问题。我的网络管理员通过将.git添加到android repo的根目录中,从而“修复了”git web中的一个错误。这是在我的本地源代码树同步后完成的。远程现在应该读

[email protected]:android.git/platform/system/core 

为了解决这个问题,我需要运行

git remote set-url development [email protected]:android.git/platform/system/core [email protected]:android/platform/system/core 

从源代码树的根修复我的整个Android源代码树一跑

repo forall -c 'pwd; git remote -v; git remote set-url development [email protected]:android.git/platform/$REPO_PATH [email protected]:android/platform/$REPO_PATH; git remote -v' 

。为了清晰的变化,在那里额外增加了一点点。

一旦固定,我跑:

[email protected] ~/android/system/system/core $ git status 
# On branch gingerbread-release-om 
# Your branch is ahead of 'development/gingerbread-release-om' by 1 commit. 
# 
nothing to commit (working directory clean) 
[email protected] ~/android/system/system/core $ git push 
Everything up-to-date 
[email protected] ~/android/system/system/core $ git status 
# On branch gingerbread-release-om 
nothing to commit (working directory clean) 
[email protected] ~/android/system/system/core $ 

排序!

1

因为当你是推到一个URL,Git并不更新任何远程分支机构。

您应该推送到development gingerbread-release-om以使该消息消失。

+0

当我这样做,git不知道在哪里可以找到repo,我得到'ERROR:gitosis.serve.main:存储库读取访问被拒绝 致命:远程端意外挂断'。如果我克隆回购,它是正确的,显示本地和远程分支在正确的地方(使用图形表示gitg),但如果我做我的问题回购它,认为远程分支的头我回来。 – Ne0

+0

什么是git远程显示开发展示(请编辑您的问题)? – Ikke