Using Git: A Dialogue Between a Language Teacher and a Linux Sysadmin
‘What is Git?’, Yuni asks. Yuni is an online teacher of Indonesian and an aspiring Linux user.
‘Well, it’s sort of a cross between a time machine and a kitchen blender, the one you make your smoothies with from all these exotic fruits that grow in your backyard’, Toomas responds. Toomas is a programmer and a Linux sysadmin.
‘I know my kitchen blender A to Z’, says Yuni proudly. ‘Why don’t you tell me about time machine part first?’
A Persistent ‘Undo’
‘Well, suppose you are editing a text with some program, and then want to undo your edits. You just
press Ctrl-Z
, right? And then Shift-Ctrl-Z
to redo, should you change your mind again. Git is an extension to
that idea, if you will.
‘When you close your file in an editor and reopen it again, the text editor won’t remember your actions, and undo won’t work. With Git, you create something called a commit, which is a snapshot of all the files in a project at this point in time. Later you can jump back and forth in history between your commits on your or any other computer.
That’s the time machine part. I wouldn’t be overconfident about the blender part, though: it’s where beginners usually start pulling their hair out.’
He shares his screen with Yuni and says:
‘Look, I’m writing a Python script here, and here’s my commit history so far…’
No Programming Skills Required
‘Do I need to learn programming first?’, asks Yuni cautiously.
‘Not at all. It’s all about text files. You can, for instance, create a set of exercises for your students, and maintain it using Git. That is, add new exercises or improve existing ones, being able to revert your changes at any time. You can push them to GitHub, and tell your students to get their exercises… Wait! And you can fork each other, and then pull…’
‘Fork each other!? Are you pulling my leg?’
‘Well, fork each other’s repositories, that is. Oh, and you can make a good use word-by-word diff. I think, you can bring your entire homework workflow to Git. Look, you’ve got a text with an exercise in a Git repo – say, that’s one commit. A student completes the exercise – that could be the second commit. The third commit is your corrections to it. Now the difference (or diff, in geeky speak) between the third and the second commit will show the corrections, like this:
Я сидел дома и, по
обокновениюобыкновению, не знал, что с собой делать. Чего-то хотелось: не то конституции, не то севрюжины с хреном…
‘I hardly understand a word, but I get the point. But will a student have to do all this mumbo-jumbo on the command line, in the terminal?’
‘They can do it on GitHub directly to an extent, and then it will be just a matter of clicking some buttons on a web page, and editing text in a web form, essentially.’
‘Listen, I have to prepare for my lessons. Can we do it together tomorrow, step by step, slowly, and with explanations?’
‘We surely can.’
And so they did.