0

我的 git 项目发生了一个奇怪的错误。

liam@development ~/android/system/system/core $ git push git@development:android.git/platform/system/core.git gingerbread-release-om
Everything up-to-date
liam@development ~/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)
liam@development ~/android/system/system/core $

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

编辑:

liam@development ~/android/system/system/core $ git remote -v
development     git@development:android/platform/system/core (fetch)
development     git@development:android/platform/system/core (push)
4

2 回答 2

1

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

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

git@development:android.git/platform/system/core

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

git remote set-url development git@development:android.git/platform/system/core git@development:android/platform/system/core

修复我的整个 android 源代码树

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

从源码树的根开始。为了清楚地改变变化,那里有一些额外的东西。

修好后,我跑了:

liam@development ~/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)
liam@development ~/android/system/system/core $ git push
Everything up-to-date
liam@development ~/android/system/system/core $ git status
# On branch gingerbread-release-om
nothing to commit (working directory clean)
liam@development ~/android/system/system/core $

排序!

于 2012-05-24T08:08:24.120 回答
1

因为当你推送到一个 url 时,git 不会更新任何远程分支。

您应该推动development gingerbread-release-om该消息消失。

于 2012-05-23T09:36:35.163 回答