News for hackers. Stuff that matters.
Re:Git-SIM: Visually simulate Git operations in your own rep... by IshKebab on Sunday January 22, 2023 @12:42PM (#34479988)
Were you trying to teach them with the CLI though? That's a terrible approach. The CLI is awful and Git is a visual thing.

It's like teaching someone to drive a car using LOGO.

The way to teach Git is:

1. Explain the mental model (correctly). Basically a commit is a snapshot with deduplication to avoid huge file sizes.

2. Show them how to use a good Git GUI. There are a lot of bad ones. I would recommend Git Extensions (terrible name but it's actually quite good). Or maybe GitX on Mac.

3. Let them learn the CLI slowly in their own time.

Re:Git-SIM: Visually simulate Git operations in your own rep... by lumb63 on Sunday January 22, 2023 @12:53PM (#34480130)
I never found a GUI that was more intuitive than the CLI, personally. I am a bad person to consult for this, since I live in vim and tmux (my coworkers hid my mouse for April Fool’s Day and I went the day without it to make a point) while others blaze ahead in VS Code and know the bare minimum command line to get their job done.

I’ll take a look at Git Extensions, thanks for the recommendation! Some of our devs took to using the integration with VS Code, which I didn’t like because I didn’t understand how its terminology (e.g. “sync” mapped to underlying Git operations). Others tried the Git GUI which I found very confusing.

I focused on the graphical operations and then tried to show them what commands they could run to execute those operations. Next time I’m in the situation, maybe I’ll adopt a GUI-first approach.

Re:Git-SIM: Visually simulate Git operations in your own rep... by bornfreddy on Sunday January 22, 2023 @03:59PM (#34482161)
My issue with gui is that sometimes I need to work with git in terminal, over ssh, so I need to know it. Once I learned it, what's the point of using a gui? [0]

[0] there is one operation where gui is more convenient for me - exploring branches in gui or GitLab ("repository -> graph") has no equivalent in cli that I know of (interestingly, GitHub doesn't have that either, but many gui tools do).

Re:Git-SIM: Visually simulate Git operations in your own rep... by IshKebab on Monday January 23, 2023 @03:23AM (#34486645)
> Once I learned it, what's the point of using a gui?

The first point is that it makes it easier to learn the concept of Git, which is most of the difficulty. Yes Git's CLI is really terrible, but if you know the concepts you can mostly just google the CLI options and learn through repetition.

The second point is that GUIs make it easier to see the state of the repo. There's a reason that even the CLI includes a basic GUI. Don't tell me you never use `git log --oneline --decorate=all --graph`.

Re:Git-SIM: Visually simulate Git operations in your own rep... by bornfreddy on Tuesday January 24, 2023 @01:14PM (#34507552)
I don't, but I'll try it, thanks! TIL. :)
Re:Git-SIM: Visually simulate Git operations in your own rep... by counttheforks on Sunday January 22, 2023 @02:04PM (#34481032)
Terrible advice, you should absolutely start with the official UI, which is the CLI. Avoiding it because "it's hard" will just complicate everything down the line.
Re:Git-SIM: Visually simulate Git operations in your own rep... by IshKebab on Sunday January 22, 2023 @06:01PM (#34483241)
When teaching children to read do you give them Encyclopedia Britannica? Of course not.
Re:Git-SIM: Visually simulate Git operations in your own rep... by counttheforks on Monday January 23, 2023 @08:52AM (#34488680)
I'd hope developers learning Git are a little more capable than literal children.
Re:Git-SIM: Visually simulate Git operations in your own rep... by IshKebab on Tuesday January 24, 2023 @02:17AM (#34500478)
I wasn't saying otherwise. It's an analogy. In case you struggle with those, in non-analogy form it would be "Do you start teaching a new concept using its most advanced incarnation?" No, you start from the basics.
Re:Git-SIM: Visually simulate Git operations in your own rep... by JenrHywy on Sunday January 22, 2023 @06:34PM (#34483543)
The problem is that every git UI I've tried of the past ~10 years abstracts core concepts in order to (try to) simplify things, then people make a mess and don't have the slightest clue why or how to fix it.

The git CLI for the vast majority of things isn't difficult once you have a basic understanding of DVCS. 95% of the time fetch, pull, push, checkout and commit are all you need.

I admit that Hg had a far nicer an more consistent CLI, and it was my preference back in the day. But it lost for a few reasons - one of which was that it made the 90% easier, but the 10% far harder.