Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
What Is Version Control?.docx59.2 KB What Is Version Control? - Solution.docx
59.4 KB
Quick reference
What Is Version Control?
Version control is incredibly important to computer programming, no matter what language or framework you use! It allows you to track changes to your code over time, and back it up in case of emergency.
When to use
Version control is something you'll use every day. Any time you make a significant change to your code, you'll need to version control save it.
Instructions
To set up Git the first time, enter these commands in the terminal:
- git config --global user.name "Your Name"
- git config --global user.email "you@youraddress.com"
- git config --global push.default matching
- git config --global alias.co checkout
- git init
Be sure to use the same email address that you plan to use later on at github.com
To Save your code and commit your changes, use these two commands in the terminal
- git add .
- git commit -am "Commit Message Here"
Version control is a great way to back up code, but it also helps several developers to work on code in groups and merge their code together in the future.
Hints & tips
- Git is the type of version control we'll use
- Git is run locally on your cloud development environment
- After we save our file with Git, we'll push it to github.com for safe keeping
Lesson notes are only available for subscribers.