git - How can I recover from 'fatal: reference is not a tree: master'? -
i have git folder, has 2 branches, master
, working
.
for reasons cant explain, when run git branch
command, 3 branches:
desktop.ini
master
working
the working
branch date (after reset), , has want in it.
the desktop.ini
branch not supposed exist. when run
git branch -d desktop.ini
it says doesn't exist , can't deleted. can't checkout out. there desktop.ini
file in each folder in git repo, google drive folder in repo stored.
the main problem, however, can no longer access master
branch. every time try
git checkout master
i back
fatal: reference not tree: master.
if seek deleting it, get
error: couldn't commit object refs/heads/master
having checked manually file exist in right directory, , has head within it.
i tried creating new master
branch, told branch named "master" exists. finally, running git log
gave recent commit, , then
error: not read c7d68...blah blah fatal: failed traverse parents of commit aed8af.....
is there easy way of resuscitating master
branch?
update: copied head working branch master branch, have access 1 time again master. every git status
returns
error: not read c7d68..... error: not read c7d68..... fatal: failed traverse parents of commit aed8......
do need deed right this?
i ran problem myself morning. in case i'm running ubuntu vm on windows host. ubuntu vm used development, files i'm working in directory shared host os. windows is, wont do, adding desktop.ini files of directories in shared directory... including .git directory , of subdirectories. git seeing these files in places not expecting 3rd party manipulating contents; when execute "git branch" listing similar of questioner.
the key here these aren't real branches. they're files in places git expecting able simple enumeration of directory contents in order find branches exist. when seek more substantial, delete new desktop.ini branch, fails because not real branch.
i resolved deleting of desktop.ini files added .git directory construction windows. did that, phantom branches went away , worked fine (it screwing git-flow in case since git-flow saw file in .git/refs/release current release in progress branch). expect these come if go on host these files in windows host file system... there may more permanent way prevent this, haven't gotten there yet.
git git-branch
No comments:
Post a Comment