om om GIT - Tips & Tricks / git.dvcs git-tips.com

Slides:



Advertisements
Similar presentations
Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Advertisements

An Introduction By Sonali and Rasika.  Required for the project  Show the versions of your code in the course of development  Show versions of your.
Version Control What it is and why you want it. What is Version Control? A system that manages changes to documents, files, or any other stored information.
SubVersioN – the new Central Service at DESY by Marian Gawron.
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
Introduction to Git and Github Joshua imtraum.com.
Distributed Version Control. Image stolen from which is really good, go read it.  Old-school version control.
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,
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
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.
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.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Version control Using Git Version control, using Git1.
Git Michael Backherms. What is Git? Free Software Development Tool o Speedy tool for distributed revision control and source code management Designed.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
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.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to Version Control with Git CSC/ECE 517, Fall 2014 A joint project of the CSC/ECE 517 staff, including Titus Barik, Gaurav Tungatkar, Govind.
Git Basics. Git stores data as snapshots of the project over time When commit Save all the files If files have not changed, point to the previous identical.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
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.
Sofia Event Center May 2014 Martin Kulov Git For TFS Developers.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
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.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
GIT: What, how and why ? Part 1: Basics. What do I know about git? Started using it for experiments on April 2009 Moved all voms development on git on.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Git for bzr users October Aurélien Gâteau An attempt at making you comfortable when you have to work with a git repository.
Backing up a machine with git
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
M.Sc. Juan Carlos Olivares Rojas
Version Control Systems
11 Version control (part 2)
CReSIS Git Tutorial.
Git Practice walkthrough.
Version Control System using Git
Sign in on the attendance sheet!
An introduction to version control systems with Git
SU Development Forum Introduction to Git - Save your projects!
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
Git CS Fall 2018.
Version Control System - Git
Version control with Git
Introduction to Version Control with Git
Git Introduction.
Git GitHub.
Introduction to The Git Version Control System
Advanced Git for Beginners
Presentation transcript:

om om GIT - Tips & Tricks / git.dvcs git-tips.com

What is non-linear is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows.

History SCSS Closed source Save original file Save snapshot of changes To get the latest version get version 1 add version 2 add version Work only on single file

History RCS Open source Cross platform Save latest version as most recent and changes are applied backward Much faster then SCSS Work only on single file

History CVS Work on multiple file Remote repository Allow Concurrent users to work at same time on same file(s) Capture changes to every single file Shared work

History BitKeeper Closed source Used for the linux kernel DVCS (Distributed Version Control) Stopped to be free in 2005

History SVN Faster then CVS Allowed saving binary data (images etc) Capture changes not on only to files or group of files but to whole directory. Takes a snapshot of the directory and not the files Shared work Can track file renames

April 2005

Born April 2005 Up to 200x faster then SVN DVCS Integrity check (SHA1) Branches are free Cross platform Compact love have You love it or have it

Why developers hate GIT CLI - most of the work needs to be done from command line Very Complex (thousands !!! of command options) git-config.html git-log.html git-config.html git-log.html Hard to learn Merge can be nightmare [5 different merge strategies !!!][5 different merge strategies !!!] Fast forward vs Not fast forward

Small example: Question: Is git case sensitive ? How does it handle case sensitive renamed files?Answer: Do Not !!! Try it at home ( * git mv)

Key Features

DVCS The Three States Hashes Change sets / snapshots Branches Fast forward vs Non fast forward Merge / Rebase

(DVCS) Key Features (DVCS) No need for central repository No network in needed = we can work offline Faster - no date needs to be sent to server (SVN: lock) Each copy it a full repo Each repository can be unique (contain its own change sets) Branches (Local) Reliability - no server down time or corrupted data

(3 states) Key Features (3 states)

(snapshots) Key Features (snapshots) CVS/SVN use deltas calculate With long histories, becomes heavy to calculate current files state

(snapshots) Key Features (snapshots) git all your files snapshot Every time you commit, or save the state of your project in git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot.

(snapshots) Key Features (snapshots)

Hands On

Installing

Installing Windows: download installer Mac (pre installed with OS) Unix – sudo apt-get update sudo apt-get install git

Configuration

.gitconfig

.gitconfig Git has 3 configuration levels System Global (User) Project

.gitconfig The configuration fall into two categories client side server side

.gitconfig The command is git config Project level: git config user.name "Nir Geier" Global level: git config --global user.name "Nir Geier" System level: git config --system user.name "Nir Geier"

.gitconfig (initial configuration) $ git config --global user.name “Nir Geier” Sets the name you want attached to your commits $ git config --global user. Sets the you want attached to your commis $ git config --global color.ui auto Enables helpful colorization of command line output

.gitconfig.gitconfig [ alias ] Same as Unix aliases – execute long commands using shortcut

.gitconfig.gitconfig [ alias ] Aliases can be simple or complicated Simple alias: ls = git log --oneline

.gitconfig.gitconfig [ alias ] Aliases can be a custom function ra = "!f() { git remote add $1 }; f"

.gitconfig.gitconfig [ alias ] complex function : "!bash -c ‘source ~/.githelpers && pretty_git_log’ "

.gitignore

.gitignore Git can be configured to ignore certain files and directories..gitignore This is configured in a.gitignore file. This file can be in any directory and can contain patterns for files. *.class ex: *.class.gitignore is parsed in a commutative way from top to bottom (system /global / root folder/ inner folder)

.gitignore Note (1): --force git add --force [filename] You can still add ignored files to the staging area of the Git repository by using the --force parameter, i.e. git add --force [filename] command.

.gitignore Note (2): Files that are committed to the Git repository are not automatically removed if you add them to a.gitignore file. You can use the git rm -r --cached [filename] command to remove existing files from a Git repository.

.gitkeep

Commands

Most common commands git init / clone git status git add git rm git commit git checkout git log

git init

Starting new project: git init [--bare] *git flow init Joining existing project (Fetching remote repository): git clone

git status

Display the working tree status 1.Differences between the index file and the current HEAD commit. 2.Differences between the working tree and the index untracked files.

git status

git add

Before Before committing change to a git repository you need to mark the changes that should be committed. This is done by adding the new and changed files to the staging area. snapshot This creates a snapshot of the affected files.

git add Note: In case you change one of the files again before committing, you need to add it again to the staging area to commit the new changes. git add. git add -A.

git rm

Remove files from the index, or from the working tree and the index. If you delete a file which is under version control, git add. does not record this file deletion. You can use the git rm command to delete the file from your working tree and record the deletion of the file in the staging area.

git rm

git commit

Add the stages files to the local repository git commit git commit -m git commit -am git commit --amend

git checkout

Checkout a branch or paths to the working tree When used on files/paths = discard changes

om om GIT - Tips & Tricks / git.dvcs git-tips.com