Git Source Control: For the Rest of Us. Nolan Erck

Similar documents
Connecting Angular and CFML

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Git! Fundamentals. IT Pro Roundtable! June 17, 2014!! Justin Elliott! ITS / TLT! Classroom and Lab Computing!! Michael Potter!

GIT VERSION CONTROL TUTORIAL. William Wu 2014 October 7

Getting started with GitHub

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

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

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

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

The Old World. Have you ever had to collaborate on a project by

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

Version Control. CSC207 Fall 2014

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

DEVNET Introduction to Git. Ashley Roach Principal Engineer Evangelist

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Using git to download and update BOUT++

Lab 08. Command Line and Git

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Git for Version Control

Software Development I

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

Liquibase Version Control For Your Schema. Nathan Voxland April 3,

A Practical Introduction to Version Control Systems

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han

I'm Andy Glover and this is the Java Technical Series of. the developerworks podcasts. My guest is Brian Jakovich. He is the

Revision Control. An Introduction Using Git 1/15

Git Introduction CS 400. February 11, 2018

What is Git? What is Git? Version Control. Barry Grant

Software Project (Lecture 4): Git & Github

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

Online Remote Repositories

Version Control Systems. Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Version Control for Fun and Profit

Computer Science Design I Version Control with Git

Managing Network Configurations with Git and GitLab

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

Version Control: Gitting Started

Lecture 14. Moving Forward 1 / 23

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

CSE 391 Lecture 9. Version control with Git

Laboratorio di Programmazione. Prof. Marco Bertini

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


USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

Git Resolve Conflict Using Mine Command Line

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

You Can t Move Forward Unless You Can Roll Back. By: Michael Black

Using Git to Manage Source RTL

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

Fundamentals of Git 1

Intro to Github. Jessica Young

How to version control like a pro: a roadmap to your reproducible & collaborative research

Push up your code next generation version control with (E)Git

A BASIC UNDERSTANDING OF VERSION CONTROL

Version control system (VCS)

Project Management. Overview

TDDC88 Lab 4 Software Configuration Management

Version Control Systems (VCS)

Teach Yourself VISUALLY IMac (Teach Yourself VISUALLY (Tech)) Ebooks Free

Revision control. INF5750/ Lecture 2 (Part I)

Outline. Version Control System (VCS) basics Git terminology & concepts Basic Git commands Branches in Git Git over the network (time permitting)

Version Control with Git ME 461 Fall 2018

Git & Github Fundamental by Rajesh Kumar.

Web Hosting. Important features to consider

Improving Your Life With Git

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

AIS Grid School 2015

Version Control May 26 talk starts at 3:10. Davide Del Vento

SECTION 2: HW3 Setup.

Using Git For Development. Shantanu Pavgi, UAB IT Research Computing

Visualizing Git Workflows. A visual guide to 539 workflows

BEGINNER PHP Table of Contents

Recap: Developer's Environment

... Fisheye Crucible Bamboo

Git: Distributed Version Control

2/8/18. Overview. Project Management. The First Law. What is Project Management? What Are These Changes? Software Configuration Management (SCM)

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

INET

GIT TUTORIAL. Creative Software Architectures for Collaborative Projects CS 130 Donald J. Patterson

Mobile Web Appplications Development with HTML5

Hello, and welcome to another episode of. Getting the Most Out of IBM U2. This is Kenny Brunel, and

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies

Introduction to Git and Github

Programming with Haiku

LPF Training Handbook!

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

SECTION 2: Loop Reasoning & HW3 Setup

Git for Subversion users

What Does Manually Manage Music And Videos Mean On Iphone

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

A Brief Git Primer for CS 350

Version Control Systems

How to git with proper etiquette

Transcription:

Git Source Control: For the Rest of Us Nolan Erck

About Me Consultant (southofshasta.com) Software Development, Training, Design Tools I use: ColdFusion, C++, Java, jquery, PHP,.NET, HTML5, Android, SQL, you get the idea... Manager of SacInteractive User Group Reformed Video Game Developer (Grim Fandango, SimPark, StarWars Rogue Squadron, etc). Music Junkie

Today's Agenda What is source control? When/why do I need it? How to use Git from a GUI. The difference in Git and GitHub. Next steps: branching, merging, reverting. Demos of how to do this. Other info. Questions.

Quick show of hands (It's okay to raise your hand, I promise.) Who is brand new to source control? Who is NOT currently using any source control in your projects? Who uses.old or.bak files as a way to save your place before making a change? Who makes ZIP files to backup the last version of your code?

Scenario 1 You're about to make a change to your website. I should save a copy of this somewhere before I break anything. Windows Explorer AboutUs.html ---> AboutUs.BAK That's good, right?

Scenario 1 (cont) What about when you make a second change to AboutUs.html? Rename the file again AboutUs.HTML ---> AboutUs.OLD Fast-forward 6 months Which is the most recent backup, BAK or OLD? Can't remember, have to diff by hand. Boo.

But wait, it gets worse Do you use FTP to update the site? And move /wwwroot up all at once? AboutUs.BAK and.old are in now in Production. Http://sitename/AboutUs.OLD Is a valid URL. Won't be processed by ColdFusion (or Ruby, PHP, etc) Original source code gets sent to the browser as plain text! Security issue!

Don't believe me? Here's proof.

Scenario 2 George and I are splitting a project. I'm working in contact.html George emails me a copy of contact.html with changes of his own. Which lines changed? Did he change them before/after my edits? I have to manually diff the 2 files. Boo.

Ever had this phone call? Client: You MUST have made a change to the site today! Everything was working FINE yesterday and now there is a bug. What did YOU break?!

Or this one? Client: Remember that huge change you made to the site last week? Well I need you to undo it. Today. Right now. Can't you just CLICK something and make that happen?

If only there was a way to prevent all of these situations from happening!

There is. Source Control. It doesn't have to be Git. For today's talk we'll focus on Git with a GUI client. (Others: Subversion, CVS, Team Foundation Server, Visual SourceSafe, PerfForce, Mercurial.)

Source control... Acts as a librarian and hall monitor for your site assets (code, images, config files, etc). Is software that tracks all the changes made to files on a project (by me, Ringo, you, that guy, everyone). Let's us share files safely. Let's us change files safely too. No more emailing files! No more BAK and OLD! No more ZIPs! Is platform agnostic. Works for Windows, Mac, Linux development. For any kind of code you write: CF, C++, Java, iphone, Ruby, COBOL, PHP, QBASIC, InstallShield, whatever.

Two pieces to the software Client Server

Two pieces to the software Client Desktop app, lives on your Dev box. OSX: Tower, GitBox, SourceTree, SmartGit, etc. Windows: TortoiseGit, SmartGit, etc. Can use any one you want. Can mix/match among team members. Free to $50-ish. Can change at any time, don't have to be married to 1 particular client.

Two pieces to the software Server So all team members can share files. A central place to do the librarian work. Keep track of who changes what, when, etc. GitHub, Unfuddle, BeanStalk, host your own, etc. Can use any one you want (doesn't have to be GitHub, that's just 1 of the vendors available). Git!= GitHub Git = the protocol under the hood (e.g. CVS, Subversion) GitHub = a popular choice for your Git server

Server + Clients GitHub, BitBucket, Unfuddle, etc Git Server John TortoiseGit Paul George GitBox GitBox (Poor Ringo...always left out.) WWW SmartGit

Adding a file to a Git Repo AKA the git add command. I want Git to watch this file for changes. Do it once, after you create the file. Just because you make a file, that doesn't mean Git watches it for changes. You must add the file to the Git repo. Let's look at an example...

Committing a file git commit Git: take a snapshot of what this file looks like right now, for later reference. Do this instead of making.bak files. The committed version of the file is stored locally. Let's look at an example...

Pushing a file git push Git: take the snapshot you made and copy it up to the Git server. Do this whenever the file(s) is ready to be shared with your team, or ready for inclusion in the latest build, etc. Let's look at an example...

Reverting a file AKA the git revert command. Ack! I just made a huge mistake in this file. How do I get it back to what it used to look like? Do this any time you messed up and need to undo a change. Under the hood, Git protocol is the same regardless of GUI client. The actual thing you press will vary between GUI clients. Here's an example in TortoiseGit...

Branching git branch I'm about to make a change to the site. I want a safe way to add my changes, but undo them quickly if something goes wrong. Do this: Always. If you're making a change to the site, put it in its own branch. Yes, even for that tiny change that's only in 1 file. Example time again...

Merging Branches git merge My new feature has been blessed by QA as bug free and is ready to be put on the Live server. (Or combined with other features for the next build.) Let's look at an example...

Common Practices Make a branch called Master for what the Production server should look like. Don't actually write code in this branch. Write in other branches, then merge them into Master. Anytime I pull from Master, I get an exact copy of what's on the Live server. Make a branch called QA. As bugs are fixed, merge them into QA. When everything in QA looks correct, merge it into master. Don't be afraid to make temporary branches to try out new ideas. No harm in making and deleting new branches.

Other Resources Pro Git Book FREE! http://git-scm.com/book Good info, examples are command-line. Tim Cunningham's Git presos and blog entries (cfmumbojumbo.com) CF Hour Podcast, episode 118 Lots of (short) tutorial videos on YouTube Peter Bell's Git courses. Google

Questions? Comments? Email: nolan@southofshasta.com Twitter: @southofshasta Blog: southofshasta.com (Slides are on my website.) Thanks!