Introduction to git Alan Orth Nairobi, Kenya September, 2010 version control for serious hackers ;)

Slides:



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

Version Control System (Sub)Version Control (SVN).
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.
LECTURE 13 OCT 18, 2010 A different take on more scripting stuff;& version control.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
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.
Git A distributed version control system 23-Aug-15.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
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.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Peter Ogden and Josh Levine.  Motivation  High level overview  Walk through the common operations  How not to break things (too badly)
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
2010. The Subversion Dilemma Check in buggy code and drive everyone else crazy Avoid checking it in until it’s fully debugged or.
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.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
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.
Git overview for RoboCup Andre Pool, September 2015.
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.
Version Control System
Version Control and SVN ECE 297. Why Do We Need Version Control?
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.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
INTRODUCTION TO GIT. Install Egit for eclipse Open eclipse->Help->Install New Software Search for one of the following -
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Git 101 Or, How to sanely manage your Koha customizations.
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.
Backing up a machine with git
Introduction to Git and git-svn Paul Gier Red Hat Sept. 27, 2011.
Basics of GIT for developers and system administrators
.git git-scm.com free and open source distributed version control system p.s. for beginners…
CS5220 Advanced Topics in Web Programming Version Control with Git
Discussion #11 11/21/16.
Git Practice walkthrough.
L – Modeling and Simulating Social Systems with MATLAB
SSE2034: System Software Experiment 3 Spring 2016
Discussion 11 Final Project / Git.
Sign in on the attendance sheet!
An introduction to version control systems with Git
Distributed Version Control with git
An introduction to version control systems with Git
SIG: Open Week 1: GitHub Tim Choh.
An introduction to version control systems with Git
Version control with Git Part II
Version Control System - Git
Version control with Git
Git started with git: 2018 edition
Version Control with Git and GitHub
Git GitHub.
Presentation transcript:

Introduction to git Alan Orth Nairobi, Kenya September, 2010 version control for serious hackers ;)

The Problem - One project, many developers... - Who fixed (or broke) what? - Exactly which changes fixed (or broke) feature X? - How can we undo those changes easily (and log them, so that we don't forget!)

The Solution - Version control! - Many solutions over the years... - CVS (kitambo) - Subversion (was very popular until git) - Mercurial - Bazaar - I am biased, but git is the $%^!. - Written by Linus Torvalds (… heard of Linux?)

git practice $ mkdir test $ cd test $ git init. $ git status 1. Create a new directory 2. Move inside the new directory 3. Initialize the new directory as a git repository 4. Show the current status of the repository

git practice $ gedit hello.txt Type “Hello World” then save and exit $ git status git shows hello.txt as “untracked” Untracked files are files which are in the current directory but are not under version control!

git practice $ git add hello.txt $ git commit -m “Add hello.txt” $ git status $ git log 1. Add hello.txt to version control 2. Commit changes in current repository (-m tells git to save a “commit message” with this commit) 3. Show status of repository 4. Show the commit log (a sort of history)

git configuration Bio Sprint?! “Ammend” the last commit, telling git who you are: $ git commit --ammend --author=”Alan Orth ” Make the settings permanent: $ git config --global user.name “Alan Orth” $ git config --global user.

Branching and merging - master: the main “branch” of development - Branches allow you to develop features and fix bugs without polluting (or destabilizing) the master - Many paradigms, but in git: branch early, branch often! - Crazy idea you want to try? Make a branch! If something breaks, just delete the branch :) - Otherwise, “merge” the branch back into master...

Branching and merging $ git branch goodbye $ git checkout goodbye $ git status 1. Create a new branch called “goodbye” 2. Switch to the new branch 3. Print out the status of the repository on the current branch. Note the [goodbye ] in the top left... we are on the “goodbye” branch!

Branching and merging $ gedit goodbye.txt $ git add goodbye.txt $ git commit -m “Add goodbye.txt” $ git checkout master $ git merge goodbye 1. Put text in goodbye.txt and then save and exit 2. Add goodbye.txt to version control 3. Commit changes to the current repository 4. Switch back to the master branch 5. “Merge” the changes from the “goodbye” branch into the current branch.

Getting Help - Don't RTFM, it is confusing and technical - Use google instead... there is always someone else who has already tried to do what you're trying to do! - Use git status frequently to see what's up - Use git diff to see what changes have been made - Use git branch to list branches in your repo - Pro git: A great, free ebookhttp://progit.org/ - Ask Alan?