4 ms·
Of course you should keep backups. But that's a different abstraction level. I have never in 15+ years of using git daily encountered one of these "weird state
by globular-toast 10mo ago
Of course you should keep backups. But that's a different abstraction level.
I have never in 15+ years of using git daily encountered one of these "weird states". Because, like I said, no command in git can modify or delete a commit.
The only real mistake you can make is hard reset with uncommitted changes in your working dir. Other than that it's down to git bugs, which I have never encountered.
- g-b-r 10mo agohttps://stackoverflow.com/questions/66449211/a-lock-file-already-exists-in-the-repository-which-blocks-this-operation-from-c https://stackoverflow.com/questions/66449211/a-lock-file-alr... happens fairly easily, and at least years ago it was not easy to figure out how to solve it. I think I did run in other bugs that did appear to have messed up the repository. > like I said, no command in git can modify or delete a commit. Well, you can end up losing commits by playing with the reflogs or deleting branches (if you haven't checked out the branch in the last by default 30 days, its commits might get deleted quickly)
- globular-toast 10mo agoI've never run into index.lock nor had anyone else run into it after it being the "git guy" at various employments. Garbage collection is a thing, of course, but it could be completely disabled if necessary. Most people don't bother because the defaults are sensible in virtually all cases. Almost all git problems people have are because they don't know about the reflog and don't understand that git is fundamentally append only.
- g-b-r 10mo ago> I've never run into index.lock nor had anyone else run into it after it being the "git guy" at various employments. Weird, to me it happened several times > Garbage collection is a thing, of course, but it could be completely disabled if necessary Yeah, I do set reflogs to not expire