Version control is an essential part of any developer’s workflow. You know that. But it’s overwhelming and downright confusing to get started. Let’s cut through the technical jargon, workflows, and confusion. In this hands-on coding lab, you will simply learn git essential commands, with no fluff, just barebones git to get you started.
Git can be confusing, overwhelming, and frustrating to master. Tutorials and online searches can confuse you even more. Or at least that’s what I’ve found when I was learning it and needed help.
I built this lab to ease you into the git commands and workflow. This lab presents all of the necessary commands you’ll need to put your projects into version control.
To make it relatable, you and I will simulate a theme project by using the Twenty Seventeen theme as our baseline. We’ll put it into version control and then rename it.
During the process, we’ll make changes, commit those changes, change our minds and roll stuff back, make typos and then fix them, and more.
At the end of the lab, you’ll create a new GitHub repo and push your code to it.
When you get done with it, you’ll be empowered to put all your projects into version control.
Don’t worry. I’m walking you through this step-by-step. And if you need help, I’m here. Just go to the Pro Forums and ask.
In order to do this lab, you will need to have git installed and configured globally. You’ll want to have your global
.gitignore file setup too. Plus, I highly advise you to have SSH to GitHub setup.
Who needs copy/paste? Right. Writing code from scratch is fun!
Total Lab Runtime: 02:55:39
- 1 Lab Introductionfree 06:10
- 2 What is Git?free 24:09
- 3 The Big Picturefree 16:30
- 4 3 Locals - Working, Staging, & Storagefree 14:38
- 5 Git Init - Put New Project into Version Controlpro 12:15
- 6 Original Theme Snapshot - Your First Commitfree 10:56
- 7 Git Add - Stage Small Changesfree 16:29
- 8 Git Commit - Store & Document a Snapshotpro 09:54
- 9 Git Status - View State of Working & Stagingpro 10:26
- 10 Git Log - View Historypro 20:29
- 11 Unstage Changespro 07:16
- 12 Rollback Changes in Working Directorypro 15:05
- 13 Fix the Last Commit Messagepro 02:39
- 14 Add More Changes to Last Commitpro 02:44
- 15 Uncommit Last Commitpro 03:32
- 16 Git Diff - View Differencespro 02:27
Developers contribute. We work on teams and/or give our time to open source projects. In order to contribute, you need to be comfortable with git, GitHub, and the workflow process. In this hands-on coding, you will learn how to wire everything up, use branching, keep everything in sync and up-to-date, handle merge or commit issues, create issues, create pull requests (PR), and more. Let's git you contributing.
Check out the Local Development Environment & Workflow for more hands-on labs, insights, Docx, and more.
Check out the series page for more labs: Git Empowered Series
Here are some available cheat sheets in PDF format for you to bookmark:
Git Cheat Sheet from GitHub
Git cheat sheet from Bitbucket
tryGit from Code School is a free, interactive, online portal to try Git online in a guided, learning environment.