Live data from Hacker News

Git is too hard

changelog.com

121–130 of 821 posts

Re: Git is too hard

#121
post #92

I'm a "senior" dev and here's my git skillset: git clone [repo] (download existing project) git init (start a new project) git checkout -b [branchname] (create a new branch) git checkout [branchname] (jump between branches) git checkout -- [filename] (reset changes in given file) git reset --hard (reset evertyhing) git clean -f -d (remove leftovers after reset --hard) git status (see changed files) git diff (see chan…

init, clone, add, commit, push, fetch, reset, checkout, status, diff, rebase and cherry-pick are all you need pretty much. I never use merge or pull. Interactive rebase is the most useful git command.

Re: Git is too hard

#122
post #85

Earlier quoted context omitted.

I'm not sure I follow your logic: why not take a few days to learn the fundamentals of git? I did that a few years back (and I'm not saying I read the source code, just learned about the base concepts from a few blogs and played around with some more advanced commands), and it has paid dividends _every single day for the last several years_. For example, I avoid tracking branches and have started using `git fetch`, `…

I am limited by time on what I can learn, every day I have five other things I'd rather spend my time learning about instead of git. The "git experts" that I know of are no more productive than me and more often than not do annoying things like rewriting commit histories after I made comments in their PRs, that I'm not convinced it's worth the day or two I need to learn it fully. In the end git is not in production,…

"The 'git experts' that I know of are no more productive than me and more often than not do annoying things like rewriting commit histories after I made comments in their PRs, that I'm not convinced it's worth the day or two I need to learn it fully."

You're annoyed at them... because they do things that you don't know how to do? How is that their fault?

"In the end git is not in production, it's just a tool to manage code, I'd rather be an expert on the code than the coding tool."

That's a very short-sighted attitude. It's like saying, "I don't want to learn how to operate a bulldozer, because I'd rather be an expert on dirt rather than the tools to move dirt."

Re: Git is too hard

#123

Earlier quoted context omitted.

Before undertaking his craft, the artisan first sharpens his tools.

A good cook doesn't need to own 5 stones to sharpen his knife, he just needs to have the number of the sharpening guy.

No? Good cooks most definitely sharpen their own knives.

Re: Git is too hard

#124
post #4

Git is one of those technologies where it's super important to get a good grasp of how to internals work. Once you got that, it get easier to answer git questions for others or yourself, and to read the documentation or man pages, as you know what is happening. With how software devs use git, it's 100% worth it to read a good book on it.

> Git is one of those technologies where it's super important to get a good grasp of how to internals work.

That's just an excuse for Git being super confusing. Does Microsoft say "it's really important when using MS Word to get a good grasp of how its internals work"? Of course not.

Yes you need to get a good mental model of how Git works (basically, commits are efficient snapshots of your code), but that's not the same as knowing its internals. Do you need to know about packfiles and loose refs etc? No, obviously not.

Re: Git is too hard

#126
I don't agree that git is 'too' hard, but I do think the author made a great point how a lot of complexities with git stem from its distributed nature which arose from its origins in the Kernel development community. Most people who use git simply don't work on anything even remotely close to that scale, and will basically only ever be working from a 'source of truth' master/main branch.

Understanding the origins of git and how it compares to the modern Github-is-git workflow really propelled my understanding of the tool and why some of the things that seemed weird to me actually make a lot of sense with that context.

Re: Git is too hard

#127
post #6

I don't agree at all. Git is the simplest version control system I've ever used. The concept of merging, rebasing, cherry-picking, and resetting works so naturally that I'm basically going to expect this level of ease of use from any VCS I use going forward. That being said, I know there are some who have trouble with Git. But IMO it isn't because Git is hard, but because they don't have to truly understand Git to us…

I'm not an idiot, but I don't fully understand git. I am coding for a living, and I use git every day. I probably could sit down for a couple of days and fully understand how git works, but I've never needed it, I understand how basic git operations work, and I stay away from commands that I don't understand. With GitHub desktop you don't need to open the command line for any standard operations, I only need to use t…

> I probably could sit down for a couple of days and fully understand how git works

This means it isn't hard. If you are capable of understanding algorithms of any complexity you should be able to learn how to use git (and how much of it) without treading on ground that is dangerous for you to use. All of this "it's too hard" rhetoric is infantilising or coddling people who frankly shouldn't be trusted to code anything of importance anyway. There's no shame in admitting your own limitations, but there is definitely shame in lowering the bar for others so much you are actively harming the industry.

Re: Git is too hard

#128
> I feel that nobody should need to have spent so much time in a terminal to be able to understand those things.

True! Too bad the author doesn't use a GUI just because they are "a Linux nerd". Magit contributed a lot to my Git understanding. And for those who don't use Emacs, I believe there are some other good GUIs out there (e.g. gitk). They allow to have a visual representation of what's going on, they show available commands, etc.

Re: Git is too hard

#129
The git CLI is too hard. I'm the "git guy" at work and can always fix people's problems and never have to resort to delete and reclone. But I don't use the CLI. I use magit. Using git is just doing operations on the DAG. Git's DAG is the most elegant implementation of a version control system that I've used. But the CLI is awful. It makes no sense. Other Git GUIs make this even worse by adding yet another layer on top of the already bad CLI. What you need is a new porcelain, like magit.

Re: Git is too hard

#130
post #6

I don't agree at all. Git is the simplest version control system I've ever used. The concept of merging, rebasing, cherry-picking, and resetting works so naturally that I'm basically going to expect this level of ease of use from any VCS I use going forward. That being said, I know there are some who have trouble with Git. But IMO it isn't because Git is hard, but because they don't have to truly understand Git to us…

I'm not an idiot, but I don't fully understand git. I am coding for a living, and I use git every day. I probably could sit down for a couple of days and fully understand how git works, but I've never needed it, I understand how basic git operations work, and I stay away from commands that I don't understand. With GitHub desktop you don't need to open the command line for any standard operations, I only need to use t…

+1

These commands will get you 99% of the way:

- git status

- git branch

- git pull

- git add

- git commit

- git diff

- git merge

- git push

- git checkout

For everything else there's StackOverflow, but the info in there comes with the risk of being stale.

--------------

Edit commit abaeb3b4: Add missing commands and improve formatting

Edit commit 842babda: Add git checkout

Post reply on HN