On Windows, if you are unwilling or unable to restart the machine see below.
Install Process Explorer: https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
In Process Explorer, Find > File Handle or DLL ...
Type in the file name mentioned in the error (for my error it was 'git-rebase-todo' but in the question above, 'done').
Process Explorer will highlight the process holding a lock on the file (for me it was 'grep').
Kill the process and you will be able to abort the git action in the standard way.