And anyway… it’s trivial to fix. If you still have the commit ID of the tip of the branch before the pull, go back to that. If not, look it up in the reflog. If that’s too much of a hassle, list the commits you only have locally, stash any changes, reset to the origin/the_branch and cherry-pick your commits again and/or apply the stash.
I really embraced git once I understood that whatever I did locally, it’s most of the time relatively easy to recover from cock-ups. And it’s really difficult to lose work from the moment you’ve added it to a (local) commit or stashed it.
I do understand that git is daunting however, and there is plenty where I think the defaults are bad. Too often I’ve seen merge commits where someone merged a the remote of a branch into the local copy of the same branch, or even this on main. And once this stuff gets pushed it’s neigh impossible to go back.
I rebase almost daily. I (almost) never merge the main branch into a feature branch, always rebase. I don’t see the point of polluting the history with this commit (assuming I’m the only dev on this branch). I also almost always do an interactive rebase before actually pushing a branch for the first time, in order to clean up commits. I mostly recreate my commits from scratch before pushing, but even then I sometimes forget to include a change in a commit I’ve just made so I then do an interactive rebase to fold fixup commits into the commits they should’ve been in.
I like merging for actually adding commits from a feature branch to main (or release or …)
this seems a well-argued article to me the ‘General directionless development’ seems the most concerning point, I don’t think the ‘let’s go with what the community ask\want’ model is gonna work in the end....
Why Git is hard (roadrunnertwice.dreamwidth.org)
Godot: The Good, the Bad, and the Ugly (blog.odorchaidhe.games)
this seems a well-argued article to me the ‘General directionless development’ seems the most concerning point, I don’t think the ‘let’s go with what the community ask\want’ model is gonna work in the end....
HashiCorp changes license from Mozilla Public License 2.0 to Business Source License 1.1 on their products (www.hashicorp.com)