Adam Young Presented by Senior Software Engineer, Red Hat License Licensed under PKI, Git and SVN.

Slides:



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

Git Branching What is a branch?. Review: Distributed - Snapshots Files are stored by SHA-1 hash rather than filename Stored in git database in compressed.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
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.
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,
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.
CIS 191: Linux and Unix Class 6 March 18, 2015 What’s Git All About, Anyway?
Introduction to Version Control with SVN & Git CSC/ECE 517, Fall 2012 Titus Barik & Ed Gehringer, with help from Gaurav.
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.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
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.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
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 Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Page 1 TBD 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy Paris Tél : Fax :
CIS 191: Linux and Unix Class 7 October 21, 2015 What’s Git All About, Anyway?
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.
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.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
1. A new git is initialized as a remote repository JohnRemote repositoryPeter master C0 CodingWhileBlack.com PROPEL CODING
1 Subversion Kate Hedstrom April Version Control Software System for managing source files –For groups of people working on the same code –When.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
Git 101 Or, How to sanely manage your Koha customizations.
Collaborative Git An introduction to Git with others
Git Girish Git VCS that I have used ClearCase, cvs, svn Happy p4 user.
SCMs – What, Why and How? ● Sawyer X ● Sysadmin / Perl Ninja ● User of Subversion, Git ● Your host for this evening ● Oh, and... ● SCMs = Source Code Management.
Introduction to GitHub
Introduction to Version Control with Git
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
Version Control Systems
Version Control with Subversion
11 Version control (part 2)
SVN intro (review).
Git Practice walkthrough.
GitHub workflow according to Google
Version Control with Subversion (SVN)
Git branches and remotes
Development and Deployment
Software Engineering for Data Scientists
Version Control with Git and GitHub
Git All hail the octo-cat
Version Control System
SU Development Forum Introduction to Git - Save your projects!
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
Anatomy of a Git Project
Advantages Project Career Divide & Conquer Collaboration
Version Control System - Git
Version control with Git
Version Control with Git
Version Control with Git and GitHub
GitHub 101 Using Github and Git for Source Control
Git Introduction.
Git GitHub.
Introduction to The Git Version Control System
Advanced Git for Beginners
Presentation transcript:

Adam Young Presented by Senior Software Engineer, Red Hat License Licensed under PKI, Git and SVN

Agenda Why git Getting started Branches Commits

Why? “Saved Games” Craft Patches Multitasking Code Reviews Lose nothing Trust

No, really, why? If I didn't do this first, I'd spend the whole time in the next presentation explaining what I was doing

But we use Subversion! SVN is a remote repository Git for local revision control Git can work with multiple remotes To Git, Subversion is just another remote protocol

Is it going to change what I currently do? Different set of commands, but they have a straightforward mapping to SVN Different set of tools Both have large communities with lots of wisdom. This talk focuses on using git to augment your SVN interactions

How do I get started? git svn clone \ \ --prefix svn/ \ -T trunk -b branches -t tags -T -b -t are svn specific --stdlayout --prefix lets us name the remote repo

You messed up! My checkout was from: /pki/trunk/pki Note the /pki at the end My git commits won't get accepted by the above repo Push to SVN as “commit cleaning” method Resort to patches if necessary

That is Slow! I SVN checkout all the time! This got the entire history, all branches, all commits You will do this only once! Incremental changes are fetched Git has a really good protocol for ensuring things stay in sync.

Why is there nothing inside the pki directory? Nothing has been checked out from the local repository List all branches: git branch -a List all remote branches: git branch -r Right now they are the same To work with Trunk $ git checkout -b trunk svn/trunk To work with PKI_8_BRANCH git checkout -b svn/PKI_8_BRANCH PKI_8_BRANCH To go back to trunk git checkout trunk

What did that do? man git checkout -b creates a new branch First unamed param is local branch name Second unnamed param is the start point Without -b and branch point, it uses a local branch

But I only work with one Branch at at time! Git makes a local repository in.git/objects Git branches are Cheap Git branches are local You can checkout branches from your local repository and FAST!

I need to make a change for the trunk. git checkout -b branchname svn/trunk Edit code git add. git commit -m “commit message”

Uh Oh. I just messed up git commit –amend git reset HEAD~1 --soft : keeps your changes --hard : clean slate git reflog

I am not ready to commit it! Commit goes to local repository In git terms, you push to a remote repository git svn dcommit

I need to create a patch for code review. git format-patch -M -C --patience --full-index I have scripted around this to use data out of the.git/config

Someone checked in changes. How do I merge? What you want is rebase, not merge. git svn fetch git rebase svn/trunk

How would I do a code review? Commit the changes for what you are working on Create a branch off of master Apply the patch to that branch git am code_to_review.patch git difftool HEAD~1 HEAD

I really don't want to commit, but I don't want to lose my changes git stash. Stack of changes, you can push and pop When you pop, they will be applied to the current branch where-ever you are

How do I back up my work? Git works with multiple repositories Create an external git repo git push miyo /public_git/pki.git git push admiyo mywork:mywork Could be done with Subversion as well

I looked in.git. What is that stuff? Files are stored by a hash of their content objects think hashtable Refs: anything named Tags: tags (Der!) Remotes: Cached info about remote repositories Heads: local branches HEAD: what is currently checked out Logs: just another series of Hashes A branch is just the name of a a bunch of files

I can't remember all this! git