Git: Cloning

From Foss2Serve
Revision as of 03:34, 10 November 2015 by Mdoroodchi (Talk | contribs)
Jump to: navigation, search
Title Cloning

Open source community comes with many different applications and modules which are constantly under development. In order to become familiar with a particular module, you need to clone the module on your virtual machine. Almost all the open source modules developed by the community use version control systems to manage and organize the changes. This document provides steps to clone a module from one such version control system.

Version Control: A version control system is a repository of files that records the changes to a file or set of files often the files for the source code of computer programs, with monitored access. Every change made to the source is tracked, along with who made the change, why they made it, and references to problems fixed, or enhancements introduced, by the change so that you can recall specific versions later. In this lab we will be using a git version control system.

Git version control: git is an open source distributed version control system originally developed by Linus Torvalds to support the development of the Linux kernel. Every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server. git can be used as a local version control system without having any central repository.

Prerequisite Knowledge Cloning
Learning Objectives Cloning using Git


Originally designed and developed by Linus Torvalds for Linux Kernel development, it is a distributed revision control system. The terminology 'distributed version control' , also known as 'decentralized version control', is designed to allow team of software developers from different organizations to work on a project. The software revisions are stored in a distributed revision control system (DRCS), also known as a distributed version control system (DVCS).


Check to make sure Git is installed:

The installed version of Fedora Operating system has git version control system preinstalled. If not, please refer to Git Set Up and install it before proceeding further.

To check if git was installed and working correctly, open VirtualBox and start Fedora 22 Operating System.

After logging in to the Virtual Machine using the user credentials created during installation, open terminal program as shown below.

1. Click on “Activities” on the top left and type “Terminal” in the search bar.

2. Now click on the Terminal Button displayed in the search results and type the command “git” in the command line.

If everything goes fine, you should see git command reference now.

Please refer to for getting familiar with all the git commands available.

Cloning a Module using Git:

Cloning a module of a git repository is done using any of the three protocols (git, https, or ssh). There is no need to worry about the protocol and git automatically takes care of it. Just follow the steps below:

In this lab, we will be cloning gnome-photos module as an example into the local workstation. All the changes we make to the source are maintained independent from the master copy using branches without messing up with the original source. gnome-photos clone links:


• ssh://

Any of the above three URI’s can be used in the cloning process.

1. To clone a module from git central repository, we use the command “git clone”.

$ git clone [git/ssh/https URI]


Create a file in your favorite editor. Add all your screenshots and then answer the following questions in the next section in your file. Also, review the following rubric for generating and submitting your work. Once you are satisfied that your lab is complete, create a pdf file and name it FossCloneWithGitLab_yourlastnamefirstinitial.pdf. Upload to your course management system.


Create a word document and include screenshots of different stages of installations in it. In addition, answer the questions.

Cloning Lab Rubric (100 points)

Screenshots of the above steps (60 points)

Lab Questions (40 points) • What is Cloning process and how is that different from copying? (10 points) • What do we mean by dependencies in the cloning process? (10 points) • (10 points) • What protocols can git use to transfer? (10 points) • Grammar, Spelling and Neatness (5 points) – named file correctly and uploaded properly on time. (5 points)


Additional Information:

Knowledge Area/Knowledge Unit Cloning
Level of Difficulty
Estimated Time to Completion 2 hours
Author Mohsen Dorodchi

Personal tools
Learning Resources
HFOSS Projects