Problem:
If you get the following error while git checkout or git pull
git unable to unlink old [file name] invalid argument
Solution
Most probably the file is opened and locked in another application. Close that application and then try again, you will successfully continue with the respective git command.