這是一個測試回購,所以我可以刪除它或提交併完成它。但是,我很惱火,我不能復位或藏匿的變化和修復回購(曖昧refmane):骯髒的回購模糊refmane
[email protected]:~/gits/test$ git status
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
# Not currently on any branch.
# Changes not staged for commit:
# modified: test
# modified: test2
#
no changes added to commit
好了,所以儘量使回購清潔:
[email protected]:~/gits/test$ git reset --hard
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
HEAD is now at 374f306 test2 id
都能跟得上。好吧,試着存儲更改:
[email protected]:~/gits/test$ git stash
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
Saved working directory and index state WIP on (no branch): 374f306 test2 id
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
HEAD is now at 374f306 test2 id
沒有。因此,儘量刪除分支:
[email protected]:~/gits/test$ git branch -d HEAD
error: Cannot delete the branch 'HEAD' which you are currently on.
And Nope。從哪裏來?
[編輯1]
[email protected]:~/gits/test$ git branch foo
warning: refname 'HEAD' is ambiguous.
fatal: Ambiguous object name: 'HEAD'.
[編輯2]
[email protected]:~/gits/kore_tools.git/test$ git branch -a
* (no branch)
master
mergetest
remotes/origin/HEAD -> origin/master
remotes/origin/master
另外: swilson @ swlap1:〜/控釋片/測試$ LS ../.git/modules/test/refs/heads 什麼都不顯示。 – ag4ve