Git and GitHub primer.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Version control Using Git 1Version control, using Git.
Programming in Teams And how to manage your code.
علیرضا فراهانی استاد درس: جعفری نژاد مهر 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 ?
Git – versioning and managing your software L. Grewe.
Version control Using Git Version control, using Git1.
Version Control. How do you share code? Discussion.
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.
Distributed Version Control Systems (or Version Control for Hipsters) Rob Gaston, web developer Farallon Geographics, Inc. SF Department of Technology.
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.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
An Introduction to Git David Johndrow COMP 490 – Senior Design & Development 2/11/16.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
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.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
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
Dr. Tanusri Bhattacharya
CS5220 Advanced Topics in Web Programming Version Control with Git
4 Version control (part 1)
Information Systems and Network Engineering Laboratory II
Primož Gabrijelčič Git for Programmers Primož Gabrijelčič
Version Control Systems
Version Control CS These slides were created by Kevin Schenk, BS in Computer Science, Purdue University, 2012.
GIT AND GITHUB WORKSHOP
LECTURE 2: Software Configuration Management
Version Control.
Keeping track of all the copies of your files
Version Control CS These outstanding slides were created by Kevin Schenk, BS in Computer Science, Purdue University, 2012.
Version Control with Subversion (SVN)
Version control, using Git
Modern Version Control with Git
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control System using Git
Development and Deployment
Storing, Sending, and Tracking Files Recitation 2
SU Development Forum Introduction to Git - Save your projects!
Akshay Narayan git up to speed with RCS Akshay Narayan
Version Control with git
LECTURE 3: Software Configuration Management
Part 1: Editing and Publishing Files
CS122B: Projects in Databases and Web Applications Winter 2018
Git CS Fall 2018.
Version control with Git
Git …for the rest of us David Turner Senior Developer
CMPE/SE 131 Software Engineering February 14 Class Meeting
Version Control with Git
GitHub and Git.
Git is a Source Control Management Tool/Version Control System.
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Version Control with Git and GitHub
CS122B: Projects in Databases and Web Applications Winter 2019
Version Control with Git
Git Introduction.
Intro to Git and GitHub Version Control using Git Carol Schofield
Git GitHub.
Introduction to The Git Version Control System
Introduction To GitHub
CS122B: Projects in Databases and Web Applications Spring 2018
Introduction To GitHub
Presentation transcript:

Git and GitHub primer

What is version control? Aka revision control, source control Version control is the management and tracking of changes to source code, documents, data, etc. Allows collaborative development Keeps track of who made a change, when the change was made, and what the change was Permits reverting any change and rolling back to a previous state Many systems available: CVS, Subversion (SVN), Perforce, git, Mercurial,…

What is git? Distributed revision control system Speed Data integrity Distributed, non-linear work flows Created in 2005 by Linus Torvalds to support the Linux kernel development Main characteristics: the entire code and history is kept on the client (user) machine users can work (make changes to code) even without internet connection internet connection required only for pushing and pulling from remote server (remote repository)

Git basics – commits Git keeps track of code history in snapshots record of what all files look like at a given point in time) User decides when to take a snapshot (commit) and what files should be included Allows going back and visiting any past snapshot later snapshots are not lost A project is made out of a series of commits Each commit contains: information on how the files changed from previous commit (diff) a reference to the previous commit (parent commit) a hash code name

Git basics – repositories A repository (or ‘repo’) is a collection of all the files and their commit history contains all commits can be local or remote Copying a repository from a remote server is called cloning Cloning allows teams to develop collaboratively Pulling: downloading commits that do not exist on the local machine from a remote repository Pushing: adding local changes (commits) to a remote repository

Git basics – branches All commits in a repository live in some branch The main branch in a repository is called the master branch A project can have many branches For example, in a project that follows GitFlow, will have a master branch, a develop branch, feature branches, hotfix branches, release branches Branches allow maintaining parallel and separate development tracks in a single project Development tracks can be branched off merged

What is GitHub? Largest web-based git repository hosting service https://github.com/ Founded in 2008 Promotes open source, but also has an Enterprise Edition for businesses Offers all Git distributed version control functionality Additional functionality: User interface (web-based) Documentation Bug tracking Feature requests Pull requests

GitHub basics – forking

GitHub basics – pull requests Public Repo Mirrored Repo Local Repo Pull Request (PR) Merge Update/Commit/Push Pull Request Fork

Sourcetree GUI client Current project Commit hash code Local branches Who made the commit? Remote branches When was the commit done? Log message for selected commit Selected commit Selected file in commit File differences (wrt parent commit)

GitFlow Proposed by Vicent Driessen http://nvie.com/posts/a-successful-git-branching-model/ A development model based on Git Adopted in ProjectChrono

Git/GitHub resources Git official website: https://git-scm.com GitHub guides: https://guides.github.com Git tutorials and training: https://www.atlassian.com/git/tutorials/ Git cheat-sheet: https://services.github.com/kit/downloads/github-git-cheat-sheet.pdf GetFlow cheat-sheet: http://danielkummer.github.io/git-flow-cheatsheet/ Git GUI clients: many options (see https://git-scm.com/download/gui/linux) Windows/Mac: Sourcetree (by Atlassian) Linux/Windows/Mac: SmartGit, git-cola