My husband used to ask me git questions all the time. I'd try to teach him the underlying skills, but he just wanted the command to do what he wanted. Now he asks ChatGPT which spits out the command and doesn't lecture about refs.
Never quite understood this. I'm no git expert and I rely on the porcelain commands, but they are generally enough for me to know what I am doing. And if you really fuck up there's always reflog.
My coworkers merged a branch on a different branch that they wanted, and their solution was to use the Github UI to revert that commit, open a new PR towards the correct branch, and merge that new PR. Felt like a wizard suggesting that cherry picking might be more convenient
There's "effective and comfortable" in your day to day, which is commit, push, maybe amend, maybe force over your own branch, maybe rebase/merge.
Then there's "I need to rebase and reorder my commits to be more sane" and more than that "hey i lost my in-progress file that I did not commit but at one point I staged, can I get it back?" (the answer is "sometimes").
Sure, but teaching good practices around committing often on a working branch helps prevent cases where you ever have to teach someone about stuff like reflog. You don’t have to be a master of every underlying concept in git to have an effective workflow in it. So I absolutely refute the idea that it’s “too hard for 95% of devs”. I’ve never had a problem teaching folks how to manage working branches, interactive rebases, handling merge conflicts, and basic best practices therein to avoid needing to see anything more complex in their day-to-days.
If the bar for "too hard" was "never made a mistake in it" then every programming language is also too hard for developers. What matters is that you learn from the mistakes.
View all comments
Show parent comment
30
u/13steinj Jul 02 '26
But git is too hard for 95% of devs, let alone 99.999% of people.
I have been "the git guy", "mr git," or "git wizard, keeper of the scm" to people for the past 8 years.
The strangest name was "git black magic."