I support this fully. Juniors and intermediate engineers I work with still struggle with git quite often and I personally know how that feels firsthand.
Not sure if this solves the issue. I personally recommend using git, but keeping it simple by limiting the allowed operations.
- git switch - git checkout - git add - git commit - git pull - git push - git rebase - git reset
Note the absence of merge and and cherry pick. Most often when a junior has messed something up it seems to be because of merging in a weird order or cherry picking the wrong thing before merging or rebasing.
Either my juniors have stopped asking me for advice (totally possible) or this recommendation helps. As I find myself very seldom needing those commands I hope and believe it's the latter :)
I support it, but I also wonder why other teams seem to spend so much time on git than we do. Our setup is fairly basic, you have a main branch, you can only push things too it by squash merge pull request that are linked to a work item, and you can only do so after whatever you’ve build has gone through the release pipeline, which among other things involve spinning up an instance of it for POs or whatever to test. When a dev wants to change something, they pick a work item on our “mostly kanban” board, and create a branch from there with a dev/name. Behind the scenes this spins up a build and a deployment to a dev/name deployment slot whenever something is pushed to it. They do their things, other devs do theirs, similarly on dev/othername branches and then when whatever is complete it gets squash merged into the main branch with a direct link to the kanban work item.
You’re mostly free to do what you want on your dev/name branch. The only thing you really need to teach “juniors” is that they will hate themselves unless they merge main into their dev branches regularly. But if you’re heading home and want to commit something, or you simply commit as often as you click cmd+s, you can do it with no useful comment because it’ll get squashed anyway. Most people where I work use GitKraken, mostly out of habit, but I think more and more are switching to VSC extensions and some might even use the cli.
The result is that we spend almost 0 time on “git” in our organisation. I wonder if we do things wrong somehow since git seems to cause issues for so many people.
Same, devs overthink it.
Others obsess over history, but personally didn’t find it worth the effort. We look back maybe twice a year, typically fixing issues moving forward.