In the front-end web development course I’m teaching right now, teaching Git and GitHub took far longer than we expected. We were trying to teach command line basics, how to initialize a repo etc., but kept getting blocked on “But why are we doing this?” type questions every step of the way. For GUI users, something like learning to change directories in the shell seemed completely pointless.
Next time I teach this lesson, I’d motivate learners before getting into the details in a couple ways. First, I’d tell them about the importance of version control. I’d ask the class if anyone has ever been working on a project that was going well, then blew up when they tried to change or add something — after trying lots of different thing, your code became a big huge mess and you have no idea how to get back to before you started the mess. Chances are this has happened to at least a few students. Regardless, I’d tell them that I’d certainly been in that situation before. Then I’d pitch the idea of a magical “reset button” that could bring you back to where you were before the mess started — version control.
Second, I’d talk about the importance of GitHub to a web developer’s career. In this industry, you’re primarly judged on your work, so a GitHub profile with lots of code on it is a great way to showcase your skills to potential employers and fellow developers. GitHub also facilitates collaboration. Web developers love to help and share — it’s one of my favourite things about this industry — so learning to use Git and GitHub will allow others to contribute to your projects and for you to give back to the community by contribution to other people’s projects.