【问题标题】:Git push, status issueGit推送,状态问题
【发布时间】:2012-05-23 09:32:47
【问题描述】:

我的 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)

【问题讨论】:

    标签: git push sync status


    【解决方案1】:

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

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

    【讨论】:

    • 当我这样做时,git 不知道在哪里可以找到 repo,我得到ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly。如果我克隆 repo,它是正确的,在正确的位置显示本地和远程分支(使用 gitg 进行图形表示),但如果我在我的问题 repo 上执行它,则认为远程分支的头我回来了。跨度>
    • git remote show development 显示什么(请编辑您的问题)?
    【解决方案2】:

    编辑 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 $
    

    排序!

    【讨论】:

      猜你喜欢
      • 2019-04-05
      • 1970-01-01
      • 1970-01-01
      • 2022-11-12
      • 2018-06-17
      • 1970-01-01
      • 1970-01-01
      • 2022-01-28
      • 1970-01-01
      相关资源
      最近更新 更多