Han Xin <chiyutianyi@xxxxxxxxx> writes: > From: Han Xin <hanxin.hx@xxxxxxxxxxxxxxx> > > When git quits unexpectedly, some temporary files(e.g. HEAD.lock, > packed-refs.lock, packed-refs.new) may remain in the repository. These > files will prevent us from performing the corresponding operations > again, even if they were created a long time ago before, until we > manually remove them. > > In order for git to automatically fix this situation, let's add a config I am not sure if we want to automatically "fix" this situation in the first place. Unless the user is sure of the reason why these lock files are left behind (e.g. "ah, I saw a power failure last night while I was trying to commit"), we are looking at a potential data loss.