I will say though that I get really nervous reverting sometimes, making sure I’m using the right command to reset etc can be confusing.
I will say though that I get really nervous reverting sometimes, making sure I’m using the right command to reset etc can be confusing.
Where I still get nervous is when I force push my branch after a rebase, even if I know I am the only one working on it. But this is also one of these examples. If I remember correctly, there are other options to sync your remote after you did a rebase, but force push is just the easiest. So I rather take 5 seconds to make sure I typed exactly what I wanted and that everything is fine and that just works.
Edit: I was just brainstorming a bit about it and thought that probably some of the unknown magic git features were just implemented by a motivated dev that just wanted to explore what's possible. But on the other hand, there are most likely some very very obscure configurations and edge cases in the wild where people actually need those features. But most people will likely never need them, so I myself won't bother understanding "everything"
It sounds like you recognise that this is an irrational fear but in case you don't: this is an irrational fear.
I freed myself from the fear of losing data after a rebase when I learned to restore from a commit in `git reflog`. So long as your work made it into an actual commit at some point, everything is recoverable from the local repo's history[1].
[1] Ignoring giganto repos that actually trigger garbage collection.