© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.

Slides:



Advertisements
Similar presentations
Version Control CS440 – Introduction to Software Engineering © 2014 – John Bell Based on slides prepared by Jason Leigh for CS 340 University.
Advertisements

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.
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.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
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.
علیرضا فراهانی استاد درس: جعفری نژاد مهر 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 A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Source Control Primer Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Drexel University Software Engineering Research Group Git for SE101 1.
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.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Gotta get Git Chris Sherwood and Alfredo Aretxabaleta USGS Woods Hole.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
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.
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.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
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 -
Technical Presentation by: David Spano. About Git (VCS) Simple Git Commands Branching Github Git GUI Summary.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
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.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
Backing up a machine with git
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
M.Sc. Juan Carlos Olivares Rojas
11 Version control (part 2)
CReSIS Git Tutorial.
Version Control.
Git Practice walkthrough.
CS/COE 1520 Recitation Week 2
Keeping track of all the copies of your files
Version Control overview
Software Engineering for Data Scientists
An introduction to version control systems with Git
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
Version Control with git
The Big Picture
SIG: Open Week 1: GitHub Tim Choh.
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Advantages Project Career Divide & Conquer Collaboration
Git CS Fall 2018.
Version Control System - Git
Version control with Git
Introduction to Git and GitHub
Version Control with Git and GitHub
Git Introduction.
Introduction to Git and Github
Git GitHub.
Introduction to The Git Version Control System
Advanced Git for Beginners
Presentation transcript:

© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015

Agenda Why are we using version control? High level overview git Working locally (init, add, commit, status) Demo Working with a remote repository (clone, pull, push) Exercise 2 (remote) Managing Change (branch, fork, merging) Exercise 3 (branch, merge) Everyday git workflow…

Why are we using version control? Writing software is a process… Unlimited undo button Historical record Manage multiple versions of a project Create ‘New’ but related projects (Fork or Branch) Co-develop software

High level overview git Git is an open source software tool that is installed on your machine. Command line interface, with graphical tools It manages sets of related files which are called a project Projects a kept in a repository Repositories record all of the changes to a project Repositories can be exchanged Repositories can be merged with other repositories

Local Workflow Local Repository Staging Working Directory Add Commit Init

Basic Usage Command line interface $ git [options] [ ] Local Commands: $ git init $ git status $ git add $ git commit –m “Initial commit for workshop”

Intro to Git Commands: CommandPurposeExample helpGet help using gitgit help or git add --help cloneMakes a local copy of a repository git clone stand-by-your-pan-tb.git statusTells us what’s going on with the repo git status addStage files to be committedgit add filename(s) commitCommits staged changes to the local repository. git commit –m “What did you do?” pullGet changes from the remote repository git pull pushPushes the changes up to the named service git push

Demo #1

When to Commit? Commits are like snap shots in time. Changes made during a commit should have some logical relationship. Commits should: Represent some modest amount of effort (time) Work should be related to one (or few) objective(s) Commit should NOT be: Evenly spaced units of time (Every hour…) Too small or too big.

Remote Local Repository pull push Remote Repository clone

Exercise 1 setup your git… $ git config --global user.name "John Doe” $ git config --global user. $ git config --global http.sslVerify “false” Clone ‘stand_by_your_pan’ project from gitlab Add / modify some file Check ‘git status’ Stage the files for commit ‘git add’ Commit the files locally ‘git commit’ Pull changes from the remote gitlab repository Push the files up to our gitlab server

Windows fixes Add Program Files/git/bin to the system path for instruction on setting the pathhttp://

Commit Each commit is assigned a ‘unique name’ (like a serial number.) The author adds a meaningful short message Commit is a snapshot of a specific branch at a specific point in time. The commit name is associated with all the files in the repository. (per branch)

When to Commit? A.Only when I am done. B.Every fixed amount of time. C.Every fixed amount of change. D.When I think that’s good enough. E.Before I do something risky. F.Before I go away on vacation G.Before I get hit by a bus.

New Commands $ git status $ git clone $ git pull $ git push $ git log $ git blame

Branching, Forking, Merging Branch – Variation of a complete project, expect to merge back into master. (Special branch ‘master’) Fork – Starting down a new direction. Not expect to merge back completely Merge – Combine two branches together. Rebase – Similar to merge but rewrites history.

Exercise 2 Pull the ‘stand-by-your-pan’ Review history Create a branch Switch between branches Push your branch up to the server Merge branches back into master

Walk through $ git checkout –b cool_new_idea Create some really great stuff and want to keep it… $ git push –u origin cool_new_branch $ git branch $ git branch --merged $ git checkout master $ git merge cool_new_branch $ git push $ git branch –d cool_new_idea

Repositories Centralized repositoryDistributed repository

Everyday Git Demo