Locked lesson.
About this lesson
Setting up Version Control in our cloud development environment.
Exercise files
Download this lesson’s related exercise files.
Version Control With Git.docx58.7 KB Version Control With Git - Solution.docx
59.2 KB
Quick reference
Version Control with Git
Version control is an important tool for any programmer to use.
When to use
Version control should be used whenever you write code.
Instructions
Version control allows you to keep track of changes to your code over time. It allows you to keep backups in case something goes wrong, and allows more than one programmer to collaborate on a project.
To set up git in your 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
To save your code:
git add .
git commit -am "Commit Message"
Hints & tips
- There are many types of version control systems.
- We'll be using git as our version control.
Lesson notes are only available for subscribers.