Can I have git gui and git bash and eclipse git plugin looking at same repo simultaneously?

StackOverflow https://stackoverflow.com/questions/10453059

Вопрос

I am using Eclipse to work on Android java projects on a Windows 7 machine. I am using Git to version-track, back up, and share.

I have git gui, git bash, and the eclipse git plug-in. My question really comes down to:

Is it safe and/or will my tools (gui, bash, eclipse) work right if I have them all open and looking at the same git repo at the same time?

I ask this because I have had eclipse fail to do a checkin a few times, and one time in git gui when it was barfing I got brave/stupid and hit the "unlock git index" choice. Since I did that unlock, none of my git clients have complained. But the suggestion that there IS a lock and that I "manually" unlocked it has me afraid that I have opened the door to non-thread safe crashes in my git repos.

TIA

Это было полезно?

Решение

Yes, it is safe. The index lock is something that is normally only intended to be held while an operation is in progress (e.g. while a commit is being created or a merge is being handled).

If you have to manually unlock the index it probably means one of your Git clients crashed/errored while it was doing one of those operations and thus accidentally left it locked.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top