Git: Cloning
Title |
Cloning |
---|---|
Overview |
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. |
Prerequisites |
Cloning |
Learning Objectives |
After successfully completing this activity, the learner should be able to:
Cloning using Git |
Process Skills Practiced |
Background
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).
Directions
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 https://git-scm.com/docs 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:
• git://git.gnome.org/gnome-photos
• https://git.gnome.org/browse/gnome-photos
• ssh://USERNAME@git.gnome.org/git/gnome-photos
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]
Documentation
Create a file using your favorite editor. Add all your screenshots of the steps. Then, answer the questions in the next section and include them in your file. For your convenience, the following rubric is provided. Please review that carefully while generating and submitting your work. Once you are completely done with your lab, create a pdf file and name it as FossCloneWithGitLab_yourlastnamefirstinitial.pdf. Submit your work as instructed by your instructor.
Deliverables
Create a document (such as word, etc.) and include screenshots of different stages of using Git for cloing in it. In addition, answer the following questions.
Cloning Lab Rubric (100 points)
Screenshots of the above steps (include caption for each screenshot explaining the 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) • What protocols can Git use to transfer files? (10 points) • Grammar, Spelling and Neatness (5 points) – named file correctly and submitted properly on time. (5 points)
Additional Information:
ACM BoK Area & Unit(s) |
SE - Software Engineering |
---|---|
ACM BoK Topic(s) |
Cloning with Git |
Difficulty |
medium |
Estimated Time to Complete |
2 hours |
Environment / Materials |
Fedora |
Author(s) |
Mohsen Dorodchi |
Source | |
License |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License |