Live data from Hacker News

Ask HN: How to give a crash course on Git?

news.ycombinator.com

21–30 of 34 posts

Re: Ask HN: How to give a crash course on Git?

#21

Give him some prescriptive formulas. He can look up the magic incantation for each task he needs to do. Deeper understanding of git can happen gradually. For now he just needs to be able to do a basic workflow. ################################ # download a new project to local disk cd ~/projects git clone someUrl ################################ # get latest code git pull ################################ # observe th…

+1

Re: Ask HN: How to give a crash course on Git?

#23
Goddamn do all the people who comment here work on linux and only through the command line, and have never used a git GUI before? There's barely any proper advice from a windows-gitgui user here.

On windows start with TortoiseGit, if he used TortoiseSVN before he'll get it. Right-clicking on a file/folder will bring up a context menu that windows users will be very familiar with, plus it has labels that even a command line git user would be familiar with. Then teach him commits, pushes and branches (git's underlying mechanics) from there on.

Re: Ask HN: How to give a crash course on Git?

#24
post #23

Goddamn do all the people who comment here work on linux and only through the command line, and have never used a git GUI before? There's barely any proper advice from a windows-gitgui user here. On windows start with TortoiseGit, if he used TortoiseSVN before he'll get it. Right-clicking on a file/folder will bring up a context menu that windows users will be very familiar with, plus it has labels that even a comman…

[deleted]

Re: Ask HN: How to give a crash course on Git?

#25

Earlier quoted context omitted.

Just point him to the source code to fully grasp the implementation details.

The better your model of how it works, the easier it is to fix things when they fail, no matter the cause. Knowing that GIT doesn't store deltas explains some of the things that made absolutely no sense before that point. You don't want to just tell a programmer... oh... here are some magic spells, don't worry about how they work, or how to fix it if you make a mistake. Tell them you don't expect them to remember all…

If a repo has been repacked, that turns it into actual deltas. ctrl-f "git" on this page: https://en.m.wikipedia.org/wiki/Delta_encoding

I value good mental models. What behavior did the difference between fake and real deltas explain?

Re: Ask HN: How to give a crash course on Git?

#26

If it were me, I would suggest gitimmersion to my team mate. https://git-immersion.github.io/gitimmersion/ If they were my report, I would allocate about twenty paid hours for the training. A contiguous block or fragments of time depending on the way the report trained best…some people want to plow through, others have limits of a few hours at a time. Not saying gitimmersion is the best tutorial. Only that it is good…

I like what this presents: "Learn by doing" thanks for posting it.

Plan to run through it myself this weekend. I used to use GIT back about 15 years ago, but have found my ability to remember it is limited.

Re: Ask HN: How to give a crash course on Git?

#27
post #23

Goddamn do all the people who comment here work on linux and only through the command line, and have never used a git GUI before? There's barely any proper advice from a windows-gitgui user here. On windows start with TortoiseGit, if he used TortoiseSVN before he'll get it. Right-clicking on a file/folder will bring up a context menu that windows users will be very familiar with, plus it has labels that even a comman…

Sublime Merge is my preferred Git GUI. https://www.sublimemerge.com

Re: Ask HN: How to give a crash course on Git?

#28

Give him some prescriptive formulas. He can look up the magic incantation for each task he needs to do. Deeper understanding of git can happen gradually. For now he just needs to be able to do a basic workflow. ################################ # download a new project to local disk cd ~/projects git clone someUrl ################################ # get latest code git pull ################################ # observe th…

On the contrary, I'd start without any remote.

Re: Ask HN: How to give a crash course on Git?

#29
post #26

If it were me, I would suggest gitimmersion to my team mate. https://git-immersion.github.io/gitimmersion/ If they were my report, I would allocate about twenty paid hours for the training. A contiguous block or fragments of time depending on the way the report trained best…some people want to plow through, others have limits of a few hours at a time. Not saying gitimmersion is the best tutorial. Only that it is good…

I like what this presents: "Learn by doing" thanks for posting it. Plan to run through it myself this weekend. I used to use GIT back about 15 years ago, but have found my ability to remember it is limited.

Glad it might be useful.

Oh, please let me know if it is broken. It's been a few years since I used it.

Re: Ask HN: How to give a crash course on Git?

#30
post #25

Earlier quoted context omitted.

The better your model of how it works, the easier it is to fix things when they fail, no matter the cause. Knowing that GIT doesn't store deltas explains some of the things that made absolutely no sense before that point. You don't want to just tell a programmer... oh... here are some magic spells, don't worry about how they work, or how to fix it if you make a mistake. Tell them you don't expect them to remember all…

If a repo has been repacked, that turns it into actual deltas. ctrl-f "git" on this page: https://en.m.wikipedia.org/wiki/Delta_encoding I value good mental models. What behavior did the difference between fake and real deltas explain?

>What behavior did the difference between fake and real deltas explain?

Merges... fscking merges. Merge conflicts are completely unnecessary. Who cares about the delta from the last snapshot?, just store the new snapshot!

I've wasted so much time on "merge conflicts" even when I'm the only person, and I've got multiple computers involved. I've completely deleted git repos and rebuilt them to get around the insanity of merges gone bad. (Now I know it's different when you've got multiple programmers, etc... but in the base case, the wrong mental model deranges thinking)

The days of pkZIP files of source code on floppy disks NEVER included merge conflicts. GIT is an otherwise amazing upgrade from those days.

Sometimes the IDE or other tools mung a file that you don't edit by hand, but need in the archive, and you CAN'T merge it.

Post reply on HN