When playing around with git
, I sometimes try out things, then abort commands which take too long (e.g. some git svn
commands that hang during network problems). This got me thinking:
Is it always safe to forcefully abort a command (Ctrl-C or kill
)? What if a command crasheds (out of memory, bug, network/FS problem)? Are repository changes "transactional" in the sense that incomplete changes are "rolled back" (like in a versioning filesystem)? Or do I risk repository corruption in that case?
I'm sure the smart people working on git must have taken this into account, yet I could not find any information in the git manual or online.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…