Git: Cloning

From Foss2Serve
(Difference between revisions)
Jump to: navigation, search
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
{| border="1"
 
|-
 
|'''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.
+
{{Learning Activity Overview
 +
|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:
 
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.
+
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.
 
In this lab we will be using a git version control system.
  
 
Git version control:
 
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 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.
 
git can be used as a local version control system without having any central repository.
  
 +
|prerequisites=
 +
Cloning
 +
|objectives=
 +
Cloning using Git
 +
|process skills=
 +
}}
  
 +
=== Background ===
  
|-
+
Originally designed and developed by Linus Torvalds for Linux Kernel development, it is a distributed revision control system.
|'''Prerequisite Knowledge''' ||Cloning
+
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.
|'''Learning Objectives''' ||Cloning using Git   
+
The software revisions are stored in a distributed revision control system (DRCS),
|}
+
also known as a distributed version control system (DVCS).
  
=== Background: ===
+
=== Directions ===
  
 
+
== Check to make sure Git is installed: ==
 
+
=== Directions: ===
+
‘’’Check the Git:’’’
+
  
 
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.
 
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.
Line 44: Line 52:
  
 
Please refer to https://git-scm.com/docs for getting familiar with all the git commands available.
 
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 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:
 
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:
Line 64: Line 72:
 
$ git clone [git/ssh/https URI]
 
$ 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.
  
'''Documentation:'''
+
=== Deliverables ===
  
Create a file in your favorite editor. Add all your screenshots and then answer the following questions in the next section in your file.
+
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.
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.
+
 
+
=== Deliverables: ===
+
Create a word document and include screenshots of different stages of installations in it. In addition, answer the questions.
+
  
  
 
'''Cloning Lab Rubric (100 points)'''
 
'''Cloning Lab Rubric (100 points)'''
  
Screenshots of the above steps (60 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)     • (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)
+
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)   
=== Comments: ===
+
• 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: ===
 
=== Additional Information: ===
{| border="1"
 
|-
 
|'''Knowledge Area/Knowledge Unit''' ||  Git Set up
 
|-
 
|'''Topic''' || 
 
|-
 
|'''Level of Difficulty''' ||
 
|-
 
|'''Estimated Time to Completion''' ||2 hours
 
|-
 
|'''Materials/Environment''' ||
 
|-
 
|'''Author''' ||  Mohsen Dorodchi
 
|-
 
|'''Source''' ||
 
|-
 
|'''License''' ||
 
|}
 
 
 
--------------------
 
  
 +
{{Learning Activity Info
 +
|acm unit=
 +
SE - Software Engineering
 +
|acm topic=
 +
Cloning with Git
 +
|difficulty=
 +
medium
 +
|time=
 +
2 hours
 +
|environment=
 +
Fedora
 +
|author=
 +
Mohsen Dorodchi
 +
|source=
 +
|license=
 +
{{License CC BY SA}}
 +
}}
  
[[Category: Learning_Activity]]
+
[[Category:Learning Activity]]
[[Category: Subcategory: Cloning]]
+
[[Category:CS2]]
 +
[[Category:Git]]
 +
[[Category:Good Draft]]

Latest revision as of 22:45, 7 September 2018


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

CC license.png

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox