本文介绍了git pull失败'错误:refs / stash不指向一个有效的对象!'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  $ git pull 
错误:refs / stash没有指向一个有效的对象!
错误:refs / stash不指向有效的对象!
错误:refs / stash不指向有效的对象!
错误:refs / stash不指向有效的对象!
当前分支mybranch是最新的。

我试过,但它不适合我。
更新信息:

  $ GIT_TRACE = 1 git pull 
trace: exec:'git-pull'
trace:run_command:'git-pull'
trace:内建:git'rev-parse''--git-dir'
trace:built -in:git'rev-parse''--is-bare-repository'
trace:built-in:git'rev-parse''--show-toplevel'
trace:built-in :git'ls-files''-u'
trace:built-in:git'symbolic-ref''-q''HEAD'
trace:built-in:git'config'' - -bool''branch.mybranch.rebase'
trace:built-in:git'rev-parse''-q''--verify''HEAD'
trace:built-in:git' rev-parse''--verify''HEAD'
trace:built-in:git'update-index''-q''--ignore-submodules''--refresh'
trace:内置:git'diff-files''--quiet''--ignore-submodules'
trace:内置:git'diff-index''--cached''--quiet'' - -ignore子模块'HEAD'''
trace:内置:git'rev-parse''-q''--git-dir'
trace:built-in:git'rev-parse''-q''--verify''refs / remotes / origin / mybranch'
trace:built-in:git'merge-base''53512e9ce3faa7c78b6d5d7ba1a63e56b5a42a11''refs / heads / mybranch'
trace:built-in:git'rev-parse''-q ''--verify''HEAD'
trace:built-in:git'fetch''--update-head-ok'
错误:refs / stash没有指向一个有效的对象!
trace:run_command:'ssh''git @ git-master''git-upload-pack'\''function-test'\\'''
错误:refs / stash没有指向到一个有效的对象!
trace:run_command:'rev-list''--verify-objects''--stdin''--not''--all''--quiet'
trace:run_command:'rev -list''--verify-objects''--stdin''--not''--all'
trace:exec:'git''rev-list''--verify-objects'' - -stdin''--not''--all'
trace:built-in:git'rev-list''--verify-objects''--stdin''--not''--all '
错误:refs / stash不指向有效的对象!
错误:refs / stash不指向有效的对象!
trace:...


解决方案

事情将是彻底删除你的藏匿处。请注意,您需要删除两个文件 - 不是一个文件,如链接解决方案中所述:

  rm .git / refs / stash .git / logs / refs / stash 


git pull is giving this error:

$ git pull
error: refs/stash does not point to a valid object!
error: refs/stash does not point to a valid object!
error: refs/stash does not point to a valid object!
error: refs/stash does not point to a valid object!
Current branch mybranch is up to date.

I have tried this solution but it doesn't work for me. Updated info:

$ GIT_TRACE=1 git pull 
trace: exec: 'git-pull'
trace: run_command: 'git-pull'
trace: built-in: git 'rev-parse' '--git-dir'
trace: built-in: git 'rev-parse' '--is-bare-repository'
trace: built-in: git 'rev-parse' '--show-toplevel'
trace: built-in: git 'ls-files' '-u'
trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
trace: built-in: git 'config' '--bool' 'branch.mybranch.rebase'
trace: built-in: git 'rev-parse' '-q' '--verify' 'HEAD'
trace: built-in: git 'rev-parse' '--verify' 'HEAD'
trace: built-in: git 'update-index' '-q' '--ignore-submodules' '--refresh'
trace: built-in: git 'diff-files' '--quiet' '--ignore-submodules'
trace: built-in: git 'diff-index' '--cached' '--quiet' '--ignore-submodules' 'HEAD' '--'
trace: built-in: git 'rev-parse' '-q' '--git-dir'
trace: built-in: git 'rev-parse' '-q' '--verify' 'refs/remotes/origin/mybranch'
trace: built-in: git 'merge-base' '53512e9ce3faa7c78b6d5d7ba1a63e56b5a42a11' 'refs/heads/mybranch'
trace: built-in: git 'rev-parse' '-q' '--verify' 'HEAD'
trace: built-in: git 'fetch' '--update-head-ok'
error: refs/stash does not point to a valid object!
trace: run_command: 'ssh' 'git@git-master' 'git-upload-pack '\''function-test'\'''
error: refs/stash does not point to a valid object!
trace: run_command: 'rev-list' '--verify-objects' '--stdin' '--not' '--all' '--quiet'
trace: run_command: 'rev-list' '--verify-objects' '--stdin' '--not' '--all'
trace: exec: 'git' 'rev-list' '--verify-objects' '--stdin' '--not' '--all'
trace: built-in: git 'rev-list' '--verify-objects' '--stdin' '--not' '--all'
error: refs/stash does not point to a valid object!
error: refs/stash does not point to a valid object!
trace:...
解决方案

The simplest thing would be to completely remove your stash. Note that you’ll need to remove two files - not one file, as outlined in the linked solution:

rm .git/refs/stash .git/logs/refs/stash

这篇关于git pull失败'错误:refs / stash不指向一个有效的对象!'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 21:44