GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

Similar documents
CSE 344: Section 1 Git Setup for HW Introduction to SQLite

CSE 344: Section 1 Git Setup for HW Introduction to SQLite. September 28, 2017

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

Git & Github Fundamental by Rajesh Kumar.

A BASIC UNDERSTANDING OF VERSION CONTROL

(Cloud9) and to the Remote Repository (GitHub)

Managing Network Configurations with Git and GitLab

Gitlab Setup/Usage by Yifeng Zhu modified by Vince Weaver 30 January 2019

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Git. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

School of Computing Science Gitlab Platform - User Notes

Getting the Source Code

Git Setup Help using GitKraken (CSE 154)

CSCI 350 Virtual Machine Setup Guide

Using Git to Manage I&T Projects and for Code & Design File CMVC

CSE 391 Lecture 9. Version control with Git

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Using Git to Manage I&T Projects and for Code & Design File CMVC

Tizen Project Guideline. SKKU Embedded Software Lab.

Version Control Systems

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

DEVNET Introduction to Git. Ashley Roach Principal Engineer Evangelist

Building Tizen Development Environment

Tutorial 2 GitHub Tutorial

Software Development I

Version Control with GIT

A brief introduction to the GitLab service at the department

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

FEPS. SSH Access with Two-Factor Authentication. RSA Key-pairs

Code and data management with Git

L Modeling and Simulating Social Systems with MATLAB

Object Oriented Programming. Week 1 Part 2 Git and egit

Using git to download and update BOUT++

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

Git(Lab) Tutorial and Hands-On

Helix4Git Administrator Guide March 2018

Software Revision Control for MASS. Git Installation / Configuration / Use

CS3210: Operating Systems

CS 390 Software Engineering Lecture 5 More Git

SwanSim - A Guide to Git / SourceTree / GitLab for Windows

Version Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now

Git tutorial. Katie Osterried C2SM. October 22, 2015

Code Repository. P Blanchfield

FEEG Applied Programming 3 - Version Control and Git II

Helix4Git Administrator Guide October 2017

Lesson 7: Recipe Display Application Setup Workspace

#25. Use Source Control in a Single- Developer Environment

Git Magic: Versioning Files Like a Boss. Tommy MacWilliam

Revision Control and GIT

MOOSE-Based Application Development on GitLab

Version control system (VCS)

Version Control: Gitting Started

Introduction to Git and Github Repositories

TangeloHub Documentation

Version control. what is version control? setting up Git simple command-line usage Git basics

BUILD AND DEPLOY ORACLE SERVICE BUS PROJECTS FROM ORACLE DEVELOPER CLOUD SERVICE TO ORACLE SOA CLOUD SERVICE USING THE ORACLE SERVICE BUS PLUG-IN

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

Php4u Payment Restrictions Module for Magento 2

Setting up a Chaincoin Masternode

License. Introduction to Version Control with Git. Local Version Control Systems. Why Use Version Control?

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

Version Control. Version Control

Introduction to Git. Database Systems DataLab, CS, NTHU Spring, 2018

CS314 Software Engineering Configuration Management

EGit/Gerrit Hands-on training #1: Installation and Configuration

Git Introduction CS 400. February 11, 2018

CSE 331 Software Design & Implementation

Table of Contents. Concepts

Overview. during this tutorial we will examine how touse git from the command line. finally we will explore a graphical visualisation of git activity

:59:32 PM PST

Why To Go With Licensed Version Control Tool When Open Source Tool Is There

Infoblox Kubernetes1.0.0 IPAM Plugin

DC/OS on Google Compute Engine

Step 1: Setup a Gitlab account

Vaango Installation Guide

2 Initialize a git repository on your machine, add a README file, commit and push

DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM GIT WITH MATTHEW REIDSMA GRAND VALLEY STATE UNIVERSITY

BUILD AND DEPLOY SOA PROJECTS FROM DEVELOPER CLOUD SERVICE TO ORACLE SOA CLOUD SERVICE

Computer Science Design I Version Control with Git

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

Submitting your Work using GIT

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

Tips on how to set up a GitHub account:

CS 390 Software Engineering Lecture 4 - Git

Code and data management with Git. Department of Human Genetics Center for Human and Clinical Genetics

Rabbit Linux Masternode with Windows Cold Wallet

Introduction to distributed version control with git

G E T T I N G S TA R T E D W I T H G I T

Having Fun with Social Coding. Sean Handley. February 25, 2010

Linux and Git Boot Camp

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

Version Control. Version Control

SPAN 301 SECCIÓN 1. Introducción

Index. Alias syntax, 31 Author and commit attributes, 334

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

GitHub Classroom. Click Sign up in to top right of the page, and the following dialog is displayed.

CSCE UVM Hands-on Session-1 Pre-Work

Transcription:

GIT A free and open source distributed version control system User Guide January, 2018 Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Table of Contents What is Git Service?... 3 User Registration Procedure... 3 Creating a Project... 3 Deploying SSH key... 5 Configuring Linux Client... 7 Install package git-core in the client system.... 7 Open terminal and setup git global variable for one time only.... 7 Locate and existing key pair... 7 Generate a new SSH key pair... 7 Clone a project... 8 Add existing folder to the repository... 8 Configuring Windows Client... 9 Install Git for Windows... 9 Locate and existing key pair... 10 Generate a new SSH key pair... 10 Clone a project... 10 Add existing folder to the repository... 11 2

What is Git Service? Git (https://git-scm.com) is the most commonly used open source distributed version control system. Git is distributed, so the local copy is fully equivalent to the original repository and enables users to commit offline. The service git.cse.iitkgp.ac.in is configured to provide a reliable git repository to the department. A web based github like interface called gitlab is provided to maintain the projects more effectively. User Registration Procedure To use the Git service at least one user needs to be registered in git.cse.iitkgp.ac.in. Registered users can create projects, assign systems to the project and/or add other existing users to the project. To create a login in the Gitlab portal, please send a mail to the gitadmin.cse@iitkgp.ac.in mentioning the following information. 1. Name 2. Supervisor s Name (for non-faculty login) 3. Email Id 4. Preferred username User will get a confirmation mail once the account is created containing the username and password. User will have to change the password provided on the first login. Creating a Project To create a project, login to the git.cse.iitkgp.ac.in and click on the Create a project link shown below. Enter project name and description and select visibility level as shown below. 3

The following screen appears if the project is created successfully. Change the protocol from the dropdown and select SSH. Please note the complete URL which is required to setup the client. For example, a project test is created under the user testuser and the repository path is shown below. Project URL: git@git.cse.iitkgp.ac.in:testuser/test.git 4

Deploying SSH key Open project and click on the settings button as shown below. Click on the Repository link from the dropdown shown below. Click on the Expand button in the Deploy keys section as shown below. 5

Copy the contents of the id_rsa.pub received from the client and paste it in the key box. Enter a title for reference. Check Write access allowed check box if you want to allow this client to push the changes to the repository. Click Add key button to add the key to the project repository. If the key is successfully added, the key appears in the Deploy keys section as shown below. 6

Configuring Linux Client Install package git-core in the client system. Example: Ubuntu: sudo apt-get install git-core Centos: yum install git-core Open terminal and setup git global variable for one time only. git config --global user.name "username" git config --global user.email "email address" Note: The user.name and user.email variable is for the user who will be using the client system. This name and email will appear in the log of repository. Locate and existing key pair Open terminal and enter the following command cat ~/.ssh/id_rsa.pub If you see a string starting with ssh-rsa you already have an SSH key pair and you can skip the key generate portion. Generate a new SSH key pair ssh-keygen -t rsa -C "email address Select the default options and press enter to complete the process. Send the generated file ( ~/.ssh/id_rsa.pub ) to the project administrator assigning into the project. Once the key is deployed in the project and you have received the project URL, you can now either clone the project or add existing code the project. 7

Clone a project Change the current directory where you want to keep the project. git clone git@git.cse.iitkgp.ac.in: testuser/test.git cd test Now, you can add or modify any file. To commit the changes to the repository user the following command. git commit -m "comment" git push -u origin master The above command git push u origin master pushes the master branch to the project repository. Add existing folder to the repository cd existing_folder git init git remote add origin git@git.cse.iitkgp.ac.in:testuser/test.git git add. git commit -m "comment" git push -u origin master 8

Configuring Windows Client Install Git for Windows Download the Windows setup from the link given below. https://git-scm.com/download/win Start the installation procedure and make sure that the following settings are checked during installation. 9

Keep all other default options as it is and finish the installation. Locate and existing key pair Open command prompt and enter the following command notepad %homepath%\.ssh\id_rsa.pub If you see a string starting with ssh-rsa you already have an SSH key pair and you can skip the key generate portion. Generate a new SSH key pair Open command prompt and enter the following command. ssh-keygen -t rsa -C "email address Select the default options and press enter to complete the process. Send the generated file (C:\Users\<username>\.ssh\id_rsa.pub ) to the project administrator assigning into the project. Once the key is deployed in the project and you have received the project URL, you can now either clone the project or add existing code the project. Clone a project Change the current directory where you want to keep the project. git clone git@git.cse.iitkgp.ac.in:testuser/test.git cd test Now, you can add or modify any file. To commit the changes to the repository user the following command. git commit -m "comment" git push -u origin master The above command git push u origin master pushes the master branch to the project repository. 10

Add existing folder to the repository cd existing_folder git init git remote add origin git@git.cse.iitkgp.ac.in:testuser/test.git git add. git commit -m "comment" git push -u origin master 11