【问题标题】:changed closed error while doing git push在执行 git push 时更改了关闭错误
【发布时间】:2013-08-07 16:55:23
【问题描述】:

我正在尝试将一些更改推送到 git 项目,并且不得不修改我的本地提交的一些更改,因此重新基于 MERGED 更改 400918(否则它不允许我设置编辑选项,不确定是否有是否有其他方式),由更改进行,现在当我尝试推送时遇到以下错误,我什至尝试根据我的更改重新设置,它仍然无法正常工作,这里有任何输入吗?

user{90}> git push ssh://company.com:29418/project HEAD:refs/for/branch                             Counting objects: 43020, done.
Delta compression using up to 32 threads.
Compressing objects: 100% (4374/4374), done.
Writing objects: 100% (5359/5359), 6.22 MiB | 8.17 MiB/s, done.
Total 5359 (delta 1534), reused 2435 (delta 863)
remote: Resolving deltas: 100% (1534/1534)
remote: Processing changes: refs: 1, done    
To ssh://company.com:29418/project
! [remote rejected] HEAD -> refs/for/branch (change 400918 closed)

【问题讨论】:

    标签: android git repository


    【解决方案1】:

    使用

       $git stash 
    

    将您的代码重置为之前的 HEAD。

    请在其他地方备份您的代码,因为它将撤消自上次提交以来的所有更改。

    运行 git stash 后;您的 repo 将指向之前的提交,现在您可以在其中合并您的最新更改,然后将您的更改推送到服务器上。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-22
      • 1970-01-01
      • 2021-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-28
      • 2019-08-08
      相关资源
      最近更新 更多