- See (videos and demonstration)
- Hear (videos and demonstration)
- Do (Independent & Group Practice)
Imagine you are coloring in a flower coloring book. You colored all the leaves green and now it's time for the best part, the petals. You know you enjoy red the best but it looked horrible after you finished it. With Git, you can revert your choice of red in a heartbeat and you are free to reapply the red if you change your mind. A work doesn't have to be permanent; every action is recorded and reversible. (Source: https://dev.to/maestromac/comment/him)
- Git is a tool that allows software engineers to keep track of changes they make to code files. They can see the changes they've made, changes other people on their team have made to the same file, and even look at line-by-line differences between two files. It's an integral part of almost every software engineer's workflow.
- Git enables software developers to have access to different versions of their code even when offline.
- If you accidentally change your code and break something, Git can revert it.
- Git lets you back up your code easily to a remote server such as GitHub, just in case something happens to your computer.
- Mostly large enterprise companies like Google, Amazon, Mozilla, and Facebook.
- Here is the GitHub page of a Mozilla project. Note how:
- It shows different versions of the code at different times (2 years ago, 4 months ago, etc).
- It shows the project contributors (24 contributors).
- It also shows who contributed last ("Latest Commit").
Participants will be able to:
- Explain what Git is and why it's useful
- Define basic vocabulary used when talking about Git
- Show how to add a file to Git's tracking system and commit changes made to that file
- Show how to work with an online repository
- What Git is
- Basic Git vocabulary
- How a file works its way through Git's inner system
- Workflow for adding and committing a file in Git
- Git and Version Control video walkthrough of slides
- Git and Version Control (slides)
- githug: a command line game
- Git Immersion: A (1-2 h total) guided tour that walks through the fundamentals of Git. You can also pick and choose what you want to practice from the menu.
Git and Version Control (slides)
- You can try the commands in the slides to get an idea of how Git works
-
"Typing commands into the Terminal is scary so I'll just skip this Git stuff." There's really no getting around needing to use Git. It's OK if typing into the Terminal feels scary at the beginning. As you grow in your skills, using the Terminal will actually become faster than using your mouse and the Finder window!
-
"I don't think I'll ever use this, so I'll just skip this Git stuff." You may not be able to see a use for Git now, but once you start working on multi-file projects you'll hopefully understand why it's an integral part of almost every software engineering workflow.
Spend just 30 minutes working through Git Immersion: A guided tour that walks through the fundamentals of Git, then stop wherever you are. If the first page takes more than a minute to figure out, you can skip it for now.
- Using only the command line:
- Create a new directory and initialize a Git repo
- Create a few files in the directory, and add some dummy text
- Add the new files to the stage
- Commit with a message, then check the
git log
to verify that it worked - Change one of the files, then check on the changes with
git status
andgit diff
- Add and commit those changes.
- Play through githug, a command-line game for learning Git. After installing it, type
githug
in your command-line prompt to play. When you think you've solved a level, typegithug
again to check your work. You'll get feedback and hints. Please complete at least up to#32: checkout
and return to the game throughout the program to practice things likemerge
andrebase
.
If you have time, continue the Git Immersion and githug tutorials if you aren't finished. Also, try looking through the supplemental materials below.
- Interactive Git course
- Single page cheatsheet
- Introduction to Git Concepts (FreeCodeCamp)
- Atlassian
- Git's own site
- Understanding Git Conceptually
- gitexplorer.com: Find the right commands you need without digging through the web.
- Git with Jair Trejo
- Command Line, Git, & GitHub with Ruthie Irvin
- Git GUI with Adoara