GIT pull failed: 'unable to unlink file: invalid argument'

I lost hours with that error too.

In my case, I got this error because some files was locked by another program. I had to close everything then I was able to pull again.

Hope this help someone :)


The error message shows the file name(s) that git was unable to unlink. In windows, you can go to Start Menu > Resource Monitor > CPU tab > Associated Handles and search for the file name (not the full path), then you will get a result of the process locking that file. In my case, it was explorer.exe. So I killed that process and git worked again as expected.

I guess you can do that same using other operating systems by finding the process(es) locking the file(s).


Try to close any other tools while using Tortoisegit