by prettyStandard · 3y ago · 0 comments
I think this is what we need more of for new git users. I struggled for the longest with git until I came across learngitbranching[0]. I believe having an interactive/visual experience while I typed in commands is what I needed, and what most people need.
I tell junior developers they should take a day to learn this and more often than not they dismiss me. Meanwhile these people will run into git conflicts or something and their strategy is to "save their work somewhere else and redownload the repo"[1]. I know of a "senior developer" that will do that. I basically told him, in my eyes, if you don't know how to use git, you are not a senior. Or a bad senior at a minimum. See the stack overflow survey. Git is used basically by all developers. How do you expect to be a good developer by dismissing such a ubiquitous tool. I think I can make an exception for people who aren't using git at their current company and any company before.
Not that there's anything wrong with that, is there?
As a "bad senior developer" who uses git daily, one of the things that I love about git is that in the end everything is regular files. So there's nothing wrong with just copying your git repository elsewhere, re-cloning it, and fixing your fuckup by hand. No need to feel guilty about it.
Your comment sounds like criticizing somebody that does not know all the keyboard shortcuts that you do.
Do you disagree that it's a fundamental tool to being a developer(today), or do you disagree that it's necessary to know fundamental developer tools to be a good senior developer?
> If you are to be a senior leading others, you should be able to explain this to juniors so they don't shoot themselves in the foot.
Firstly, not all seniors are managers. Secondly, it is not a good use of a senior engineer's time to be teaching fundamentals to a junior developer. I am a decent developer, a passable manager, and a poor teacher. It's much better for me to point my team in the direction of existing tools.
> Do you disagree that it's a fundamental tool to being a developer(today), or do you disagree that it's necessary to know fundamental developer tools to be a good senior developer?
Other VCS tools exist, it's possible to have gone a decade in the industry as an effective developer without using git. Many large companies use Perforce, other companies use internal tools. I disagree that it's necessary to understand the working model of fundamental tools to use them. We don't require truck drivers to understand the difference between the Otto and Diesel cycles to drive a truck, why is it ok to force developers to undersatnd the many, many, many different operations that `git checkout` can perform depending on the state of your repository/what you've asked it to do?
As a senior you not only should understand how to stash local changes and handle merge conflicts, but also generally use your VCS to elevate your development ability. Finding who added a bug and when with cherry picking. Retroactivity applying changes to all of history with rebasing and branching. All of this git provides if you put in the effort to learn it, and more. It’s an incredibly powerful tool, and to not use its capabilities is simply a waste.
Your “reclone the repo and start again” case is a lot of wasted effort. You could use one or two quick commands to undo your changes. Your ignorance at how the tool works doesn’t undermine its value or purpose.
I’d expect a senior to not only be able to handle these cases, but also show interesting other tools in git and when they’re useful. I wouldn’t expect a senior to not be able to handle simple conflict resolution.
Would be great to get any feedback you might have if you get the chance to install/test it out.