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

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

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Using git to download and update BOUT++

Software Development I

Git Introduction CS 400. February 11, 2018

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

Getting started with GitHub

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

Visualizing Git Workflows. A visual guide to 539 workflows

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

Git tutorial. Katie Osterried C2SM. October 22, 2015

Github/Git Primer. Tyler Hague

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

Introduction to Git and Github Repositories

CSE 391 Lecture 9. Version control with Git

Version Control with Git ME 461 Fall 2018

Using Git and GitLab: Your first steps. Maurício

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

F17 Modern Version Control with Git. Aaron Perley

Git. Presenter: Haotao (Eric) Lai Contact:

Git for Version Control

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

AIS Grid School 2015

Tizen/Artik IoT Practice Part 4 Open Source Development

Intro to Github. Jessica Young

S18 Modern Version Control with Git

Laboratorio di Programmazione. Prof. Marco Bertini

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

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

Introduction to Git and GitHub. Tools for collaboratively managing your source code.

Review Version Control Concepts

Using GitHub to Share with SparkFun a

CS314 Software Engineering Configuration Management

Use git rm to remove files from workspace

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Version control with Git.

CSE 344: Section 1 Git Setup for HW Introduction to SQLite

Lab 08. Command Line and Git

CSE 344: Section 1 Git Setup for HW Introduction to SQLite. September 28, 2017

Code and data management with Git. Department of Human Genetics Center for Human and Clinical Genetics

Version Control: Gitting Started

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

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

G E T T I N G S TA R T E D W I T H G I T

Lecture 3: Processing Language Data, Git/GitHub. LING 1340/2340: Data Science for Linguists Na-Rae Han

Having Fun with Social Coding. Sean Handley. February 25, 2010

Setting up GitHub Version Control with Qt Creator*

Git & Github Fundamental by Rajesh Kumar.

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

Git Setup Help using GitKraken (CSE 154)

Algorithm Engineering

git and the virtue of version control ECE /2/2015

b. Developing multiple versions of a software project in parallel

Distributed Version Control

Tips on how to set up a GitHub account:

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

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

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

Version Control Systems

How to be a 1337 h4ck3r: Git + Linux

Software Revision Control for MASS. Git Basics, Best Practices

Version Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now

Version Control System GIT


Managing Network Configurations with Git and GitLab

Beyond git add/commit/push

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

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

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

Version Control for Fun and Profit

git-flow Documentation

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

Revision Control. An Introduction Using Git 1/15

From Commits to Collaboration: A Git Tutorial for Social Scientists

Git. Ľubomír Prda. IT4Innovations.

Effective Software Development and Version Control

Version Control Systems (Part 1)

Version control CSE 403

I m an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus Torvalds, creator of Linux and Git

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

INET

Version control system (VCS)

L Modeling and Simulating Social Systems with MATLAB

Version Control with Git

Windows. Everywhere else

Git. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

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

A BASIC UNDERSTANDING OF VERSION CONTROL

Chapter 5. Version Control: Git

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

Software Project (Lecture 4): Git & Github

GIT VERSION CONTROL TUTORIAL. William Wu 2014 October 7

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Θερινό Σχολείο, Ιουλίου git. Αχιλλέας Πιπινέλης. Μονάδα Αριστείας ΕΛ/ΛΑΚ ΤΕΙ Αθήνας

How to be a git. Dominic Mitchell

Fundamentals of Git 1

Transcription:

Git 101:

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 Github icon

1 Install git and a create GitHub account

Install git Linux (Debian) - Command: sudo apt-get install git! Linux (Fedora) - Command: sudo yum install git! Mac - http://git-scm.com/download/mac Windows - http://git-scm.com/download/win

Create Github account www.github.com Free for public repositories

What is version control? A system that keeps records of your changes Allows for collaborative development Allows you to know who made what changes and when Allows you to revert any changes and go back to a previous state

2 What is git?

What is version control? Distributed version control Users keep entire code and history on their location machines Users can make any changes without internet access (Except pushing and pulling changes from a remote server)

What is git? Started in 2005 Created by Linus Torvald to aid in Linux kernel development Git icon

What is git? Git isn t the only version control system But (we think) it s the best

3 How does git work?

How does git work? Can be complicated at first, but there are a few key concepts Important git terminology in following slides are blue

Key Concepts: Snapshots The way git keeps track of your code history Essentially records what all your files look like at a given point in time You decide when to take a snapshot, and of what files Have the ability to go back to visit any snapshot Your snapshots from later on will stay around, too

Key Concepts: Commit The act of creating a snapshot Can be a noun or verb I commited code I just made a new commit Essentially, a project is made up of a bunch of commits

Key Concepts: Commit Commits contain three pieces of information: 1. Information about how the files changed from previously 2. A reference to the commit that came before it Called the parent commit 3. A hash code name Will look something like: fb2d2ec5069fc6776c80b3ad6b7cbde3cade4e

Key Concepts: Repositories Often shortened to repo A collection of all the files and the history of those files Consists of all your commits Place where all your hard work is stored

Key Concepts: Repositories Can live on a local machine or on a remote server (GitHub!) The act of copying a repository from a remote server is called cloning Cloning from a remote server allows teams to work together

Key Concepts: Repositories The process of downloading commits that don t exist on your machine from a remote repository is called pulling changes The process of adding your local changes to the remote repository is called pushing changes

Key Concepts: Branches All commits in git live on some branch But there can be many, many branches The main branch in a project is called the master branch

So, what does a typical project look like? A bunch of commits linked together that live on some branch, contained in a repository Following images taken and modified from: http://marklodato.github.io/visual-gitguide/index-en.html Also a good tutorial!

So, what does a typical project look like? Time going forward

So, what is HEAD? Time going forward

So, what is HEAD? A reference to the most recent commit Time going forward

So, what is HEAD? A reference to the most recent commit (in most cases not always true!) Time going forward

So, what is MASTER? The main branch in your project Doesn t have to be called master, but almost always is! Time going forward

Key Concepts: Branching off of the master branch The start of a branch points to a specific commit When you want to make any changes to your project you make a new branch based on a commit

Key Concepts: Branching off of the master branch Images from: http://codingdomain.com/ git/merging/ Time going forward

Key Concepts: Merging Once you re done with your feature, you merge it back into master Time going forward

Key Concepts: How do you make a commit anyway? There are a lot of states and places a file can be Local on your computer: the working directory When a file is ready to be put in a commit you add it onto the index or staging Staging is the new preferred term but you can see both index and staging being used

Key Concepts: How do you make a commit anyway? The process: Make some changes to a file Use the git add command to put the file onto the staging environment Use the git commit command to create a new commit

Key Concepts: How do you make a commit anyway? Time going forward

Key Concepts: How do you make a commit anyway? Time going forward

4 What is GitHub?

What is GitHub? www.github.com Largest web-based git repository hosting service Aka, hosts remote repositories Allows for code collaboration with anyone online Adds extra functionality on top of git UI, documentation, bug tracking, feature requests, pull requests, and more! Octocat!

What is GitHub? Founded in 2008 Also has an Enterprise edition for businesses Octocat!

Additional Resources

Additional Resources Official git site and tutorial: https://git-scm.com/ GitHub guides: https://guides.github.com/ Command cheatsheet: https://training.github.com/kit/ downloads/github-git-cheat-sheet.pdf Interactive git tutorial: https://try.github.io/levels/1/challenges/1 Visual/interactive cheatsheet: http://ndpsoftware.com/git-cheatsheet.html