News for hackers. Stuff that matters.
Re:Things I know about Git commits by vbezhenar on Saturday July 13, 2024 @07:04AM (#40953330)
I'm creating local tmp1 tmp2 branches before I'm doing anything sketchy. Branches will keep the commit visible and I can always return to the previous state if necessary. Tags would be more appropriate, I guess, I just got used to branches more.
Re:Things I know about Git commits by anyfoo on Saturday July 13, 2024 @03:40PM (#40956317)
You can see „git reflog“ as a sort of automatic tmp-branch creation at every step. Of course your way works as well, and I tend to do the same when I know it‘s getting hairy, but it‘s nice to just be able to do git stuff knowing you can always go back without much precaution.

The only thing I need to remind me to be careful about is, as said, uncommitted changes. With some luck, Time Machine can help for that, but to be safe I practically always stash away changes instead of somehow undoing them.

Re:Things I know about Git commits by vbezhenar on Sunday July 14, 2024 @08:09PM (#40964245)
I prefer to use git from GUI and those usually do not support reflog. I'm aware of it, but that's my tool of the last resort, if I did something very wrong.