Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Rename from commit-graph.lock to commit-graph failed " when running git commands from a batch file

I have written a batch file to automate a series of git add/commit/push actions but I am getting hit with a Rename from commit-graph.lock to commit-graph failed messages, see attached pic. My batch file has several of this 3-line snippet copied one below another as follows

git add 10\14*\*.csv 
git commit -m "updating files" 
git push origin master 

git add 10\15*\*.csv 
git commit -m "updating files"  
git push origin master 

I think the y/n messages is dropped with the git commit is called (but I am not sure). Answering 'y' gives me back the same message while answering 'n' looks to work ok, commit is executed, files pushed upstream and it moves to the next set of commands until the lock is raised again..

I have rebooted the pc, and ran the batch file without any other programs open (at least manually) but to no avail. Also I dont think there is another process that locks the file.

Any ideas please?

enter image description here

like image 372
Aenaon Avatar asked May 21 '20 10:05

Aenaon


1 Answers

Hope this will be useful for someone later: for me the issue was the other app (VS Code) was using this file. As soon as I closed it, the problem disappeared. Maybe that one can also help you.

like image 152
Vladimir Mironov Avatar answered Oct 29 '22 06:10

Vladimir Mironov