I am facing below issue while taking fresh pull. (git pull
)
error: cannot update the ref 'refs/remotes/origin/xyz': unable to create directory for '.git/logs/refs/remotes/origin/xyz': No such file or directory
I have checked particular location and there is neither permission issue nor such directory exists.
Jfyi I have already searched similar threads but those are not worked for me and most of them are related to append, delete etc.
I am badly stuck at this and any help would be highly appreciated.
I had this error as well:
during a migration from hg Mercurial to GitLab repo using
fast-export
and when I then tried togit push -u origin --all
to end the migration to GitLab.I followed the other answer that said that a file needs to be deleted and found the files with the chosen directory name in them by running:
Outcome:
on hg side:
checked, deletion does not solve it
and git side:
./.git/config
gets filled while you push the repo to the branch. The entries only show what was merged, it is not the configuration file that made it do so. Deleting a file that only documents what has been done makes no sense. The reason must be found elsewhere.
./.git/hg2git-heads
checked, deletion does not solve it
hg / git
I also checked deleting both the file on hg side and the
hg2git-heads
file on git side, it did not change the error.After so many tries, I checked the repo on GitLab itself. And it turned out that everything was in there as needed. All branches are there, even though they are also in that error list at the end of the
push
.One can see that this error likely does not harm the git repository. And since it does not harm here, it might also not harm there, in your case, when you pull the repository. In other words: you may ignore this error.