Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git warnings about unable to unlink git objects. How do I resolve this?

Tags:

git

When I do a git commit I see the following

>$ git commit -a
warning: unable to unlink .git/objects/63/tmp_obj_kK6IC9: Invalid argument
warning: unable to unlink .git/objects/2c/tmp_obj_SFNGla: Invalid argument

I can still perform git commit. However, I want to know how to get rid of the warnings.

like image 283
Kim Stacks Avatar asked Apr 03 '14 04:04

Kim Stacks


2 Answers

I had a similar problem on OS X whenever trying to run "git repack" or "git gc", and I finally solved it after coming across this page: http://hints.macworld.com/article.php?story=20010610132749532

The fix is to open a terminal, go to your git repo, cd into the .git folder, and then type chflags -R nouchg *. If that was the issue, then after that, your git commands will work as normal.

like image 165
Learn OpenGL ES Avatar answered Nov 02 '22 16:11

Learn OpenGL ES


only delete ./git/gc.log file .

like image 5
Selvin11 Avatar answered Nov 02 '22 15:11

Selvin11