Linux+ Automation: Implement Version Control Using Git
In this lab, you’ll practice using git as a version control system. When you’re finished, you’ll have the skills needed to operate version control using git, being able to create new branches and merge them with the master before creating new version releases.
Terms and conditions apply.
Lab info
Lab author
Challenge
Get Started in the Lab Environment
Here are the initial instructions and explanation of the lab environment. Read this while your environment is busy creating itself from nothing. Yes, this violates physics; we know. How fun!
Challenge
Convert Code to Git
Using git, developers and or administrators can collaborate and share code or configurations. This is usually over the network, be it to on an SSH server or an HTTP server. For this lab, you will use a single server solution and the filesystem to share git repositories. Realizing some of your code should be shared with colleagues, you will convert the existing code-directory to a git repository.
Challenge
Clone Existing Repository
By the end of this challenge you will be able to clone an existing repository, and will understand the limitations of the current repository status, having been converted from an existing directory.
Challenge
Create a Bare Repository Ready For Collaboration
In this challenge, you will learn to create a new bare repository without existing content, which will allow for collaboration.
Challenge
Add Code Remotely
Having cloned the bare repository, you will now add code to it; you never work directly in the repository itself. You will now add the script and readme file to the cloned repo before pushing the changes back.
Challenge
Work With Branches
When developing code, it is normal to separate the development code from the production code by using branches. The default branch is master when using the git client. When developing new code within the same project, you will create a branch and push the branch back to the server. The default clone will still pull the production master branch, but other developers and testers can pull the development branch specifically
Challenge
Clone Branches and Tag Releases
The default clone of a repository will be the master branch, and will be the current production version of the code. Developers and testers will need to clone development branches. Before new code is moved into production, version releases can be frozen using tags so they can be downloaded independently of the current production code.
Challenge
Merge Branches into the Master Branch
Once the development branch has been fully tested, you are ready to merge it into the master or production branch. This allows development to continue as required in the development branch, and verified code on the master branch to become part of the production environment.
Challenge
The Last Challenge
Welcome to the final challenge! This is your last chance to experiment in the environment. Clicking Finish Lab will end this little world that flittered into existence just for you.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.
Recommended prerequisites
- Basic command line experience in using Linux, such as being able to run commands and change directories
- Familiarity with diff output will help, too