By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.

Slides:



Advertisements
Similar presentations
Week 2 DUE This Week: Safety Form and Model Release DUE Next Week: Project Timelines and Website Notebooks Lab Access SharePoint Usage Subversion Software.
Advertisements

Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Intro to Version Control Have you ever …? Had an application crash and lose ALL of your work Made changes to a file for the worse and wished you could.
om om GIT - Tips & Tricks / git.dvcs git-tips.com
Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git: Part 1 Overview & Object Model These slides were largely cut-and-pasted from tutorial/, with some additions.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Fundamentals of Git By Zachary Ling 29 th, Aug,
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Git. What’s Git? A British swear A Distributed Version Control System Developed in 2005 by Linus Torvalds for use on the Linux Kernel Git Logo by Jason.
Introduction to Version Control with SVN & Git CSC/ECE 517, Fall 2012 Titus Barik & Ed Gehringer, with help from Gaurav.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
A primer on version control at OTN
Git – versioning and managing your software L. Grewe.
GIT An introduction to GIT Source Control. What is GIT (1 of 2) ▪ “Git is a free and open source distributed version control system designed to handle.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Source Control Primer Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Drexel University Software Engineering Research Group Git for SE101 1.
…using Git/Tortoise Git
Lokesh Puppala. Introduction  Git - Distributed version control system  Initiated by Linus Torvalds  Strongly influenced by Linux kernel development.
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Subversion (SVN) A Revision Control System Successor to CVS Carlos Armas Hervey Allen.
Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Refactoring and Synchronization with the StarTeam Plug-in for Eclipse  Jim Wogulis  Principal Architect, Borland Software Corporation.
QUICK START OF GITHUB Lin Shuo-Ren 2013/3/6 1. Why We Should Control The Version Although it rains, throw not away your watering pot. All changes should.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Version Control and SVN ECE 297. Why Do We Need Version Control?
Lecture 2 Making Simple Commits Sign in on the attendance sheet! credit:
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
An Introduction to Git David Johndrow COMP 490 – Senior Design & Development 2/11/16.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Database & Information Systems Group University of Basel DBIS Group Talk Michael Springmann Distributed Source Code Management in Mercurial.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
Technical Presentation by: David Spano. About Git (VCS) Simple Git Commands Branching Github Git GUI Summary.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
© CGI Group Inc. User Guide Subversion client TortoiseSVN.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
DIGITAL REPOSITORIES CGDD Job Description… Senior Tools Programmer – pulled August 4 th, 2011 from Gamasutra.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
Git Girish Git VCS that I have used ClearCase, cvs, svn Happy p4 user.
Backing up a machine with git
4 Version control (part 1)
SVN intro (review).
Git Practice walkthrough.
Storing, Sending, and Tracking Files Recitation 2
An introduction to version control systems with Git
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Git CS Fall 2018.
Version control with Git
Introduction to Version Control with Git
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Version/revision control via git
Git Introduction.
Introduction to The Git Version Control System
Presentation transcript:

By: Anuj Sharma

Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first time.

GIT- Introduction Git is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005, and has since become the most widely adopted version control system for software development. As with most other distributed revision control systems, and unlike most client– server systems, every Git working directory is a full-fledged repository with complete history and full version-tracking capabilities, independent of network access or a central server. Like the Linux kernel, Git is free software distributed under the terms of the GNU General Public License version 2.

Benefits of GIT over Clearcase Atomic commits Proper change sets Speed A proper history browser (so that you can see what changed for a commit, rather than the individual file nightmare of clearcase) Reduced maintenance cost and overhead No licensing cost GIT is actually being maintained (I know clearcase 8 has a new GUI, but the underlying tools will still be the same old clunky and rotten relics) Merges that are more sophisticated than the dumb text merges of clearcase, allowing a more flexible branching strategy Considerably lower overhead for a developer (can you imagine any system with higher developer overhead than clearcase!) MUCH, MUCH, MUCH easier branching and merging. No VOB locking during backups. Easier to back up

 Git has a 'clean' command. SVN desperately needs this command, considering how frequently it will dump extra files on your disk.  Git has the 'bisect' command. It's nice.  SVN creates.svn directories in every single folder (Git only creates one.git directory). Every script you write, and every grep you do, will need to be written to ignore these.svn directories. You also need an entire command ("svn export") just to get a sane copy of your files.  In SVN, each file & folder can come from a different revision or branch. At first, it sounds nice to have this freedom. But what this actually means is that there is a million different ways for your local checkout to be completely screwed up. (for example, if "svn switch" fails halfway through, or if you enter a command wrong). And the worst part is: if you ever get into a situation where some of your files are coming from one place, and some of them from another, the "svn status" will tell you that everything is normal. You'll need to do "svn info" on each file/directory to discover how weird things are. If "git status" tells you that things are normal, then you can trust that things really are normal.  You have to tell SVN whenever you move or delete something. Git will just figure it out. Benefits of GIT over SVN

GIT –Basic Workflow First, we need to install git in our system. It can be done in many ways. I am giving an example of Linux. I am using “Ubuntu ” Linux flavor to explain. So, its very simple to install using below command: sudo apt-get install git

Now, git is installed in your machine. Just verify it once by running this command: git --version Then, someone needs to create the central repository on a server. If it’s a new project, you can initialize an empty repository. Central repositories should always be bare repositories (they shouldn’t have a working directory), which can be created as follows: git init --bare MyProject.git

You might have noticed the –bare repository created above ended in.git. By convention, bare git repositories should end in.git. For example, project1.git. The.git ending of a directory signals to others that the git repository is bare. The Bare repo contains below things initially:

Since now we have a git repo ready at our server. Now we have to make use of this centralized repo. All we need to do, is to clone this repo to have a local copy of ours. Cloning a repo also needs some permission. Now we will check two approaches. 1. Cloning a repo in same server (IP), with different user name. I have one other user in my server “sharma”. 2.Cloning a repo in different server (IP) will need some special feature “ssh”.  Create a pub file with your details, using the below command; ssh-keygen -t rsa -C  It will create few pub files, out of which you can just do, cat.ssh/id_rsa.pub It will be having at the end, just to verify it got generated with your details. It can be seen in the below snapshot.

 Create a file with authorized_keys name, and add your pub files to it. cat.ssh/authorized_keys  Now change the permissions of authorized_keys as it will act an important role in providing access to other users. chmod 700.ssh/authorized_keys It can be seen in the below snapshot.

You may add as much as pub files as you want. It will act as an authentication for your git repo. Now whenever any user want to clone, git admin has to provide access by adding a pub file to authorized_keys. And your clone command would be something like this. git clone It will not ask for password, if pub file is already added.

So, now we have local repo of our own. We have to check which repo we are using, we can use “git remote -v” to check the same. It will display the git repo, your are in. Now, we have to add few things to our git config, so that it will give the information of user. We need to use below commands as shown in snapshot.

Now, we can start working on our repo. Lets create a test file in git repo “abc.txt”. git status will give the. It can be shown in below snapshot. The red color shows that file is not a part of git yet. For this we need to add this file to git repo, using “git add”

Since this file is added to git, color has been changed to green. It means, it is now added to staged area of git, from where we can proceed to commit. It can be shown below: -s is used for “signed-off by user” -m is used for “message” We can check the git log, how it will look. Commit-id show above is unique to a change.

This presentation ends here, In my next presentation, we will go bit deep and cover most of the commands with their use cases. Till then you may check the commands on my blog: Thank you….