The Intro. Aaron Bartell Director of IBM i Innovation. Copyright 2015 Aaron Bartell

Size: px
Start display at page:

Download "The Intro. Aaron Bartell Director of IBM i Innovation. Copyright 2015 Aaron Bartell"

Transcription

1 The Intro Aaron Bartell Director of IBM i Innovation albartell@krengeltech.com Copyright 2015 Aaron Bartell

2 This session brought to you by... Consulting - Jumpstart your open source pursuit. Small and big projects. Free Educational Content on everything open source for IBM i at litmis.com spaces.litmis.com provides open source development via browser on IBM i machine in the cloud. albartell@krengeltech.com

3 Agenda - What is Git? - Real-world example - Install - Create repository - Tutorials: common commands - Connecting to GitHub and Bitbucket - Common workflow - Further Configuration - Tools - Live tutorial

4 what is Git? Layman: Retain history of source code changes Distributed version control (full repo exists locally) client and server are both equal Git repos Free and open source Created by Linus Torvalds as a better alternative to Subversion/other Easy to install Operates in the IFS on *STMFs (can work with RPG) Many commands for change management, communication, diffs, etc. Note: Git commands and syntax aren't immediately intuitive (they tried). Google is your friend. Graphical tools are even better (ungit, the best). rogerdudler.github.io/git-guide - High-level overview

5 real-world IBM i Project: ibmichroot (IBM i Chroot) Descr: Used for creating isolated environments on IBM i for open source development. All managed with Git on Bitbucket. Loc: bitbucket.org/litmis/ibmichroot wikipedia.org/wiki/chroot - Definition of chroot

6 installation 1 - Visit bit.ly/yips-ibmiperzl 2 - Download file download-2.0.tar.zip, unzip on desktop, FTP to IBM i in directory /QOpenSys/download 3 - Run the below from a PASE shell (i.e. CALL QP2TERM) $ cd /QOpenSys/download $./wwwperzl.sh aix61 wget git $./wwwperzl.sh aix61 rpm git $ export PATH=/opt/freeware/bin:$PATH $ which git /opt/freeware/bin/git $ git --version git version bit.ly/how-to-contribute-to-open-source-on-ibmi - Full tutorial Alternative: ibmichroot (git v2.2.2)

7 config Tell git about you $ git config --global user.name "John Doe" $ git config --global user. johndoe@example.com user.name and user. are used to document who made changes. Turn colored diffs off $ git config --global color.diff false By default color.diff is true and that makes for a messy screen because color-escape chars don't render correctly. git-scm.com/docs/git-config - Config file docs stackoverflow.com/questions/ /git-diff-odd-characters-on-ibm-i-operating-system - Colored diffs

8 demo time Interactive demo. Covers slides up to "fork and pull"

9 tutorial: init(ialize) repo(sitory) Command git init creates an empty Git repository in the current directory. $ pwd /home/aaron $ mkdir website1 $ cd website1 All repository info is stored in the.git directory. $ git init $ ls -all drwxr-sr-x 7 aaron Sep 22 21:00.git No additional directories or files are stored below the root of the repository. Keeps from muddying up your directory structure. git-scm.com/docs/git-init - Docs

10 tutorial: commit Use git commit to save a version of the code base into the local repository. $ echo "<title>ibm i wins in the end</title>" > index.html $ git commit -am "initial commit, added a title." working directory: Your IFS directory and the files you are currently editing. Edits are not managed until you commit them to the repository. repository: Stores all commits since repo creation. Command git commit is used to place staged files into repository. Repository is in.git directory of repo root directory. git-scm.com/docs/git-commit - Docs git-scm.com/docs/git-add - Docs Note: Command git commit -a is a shortcut to skip staging and directly commit working directory files.

11 tutorial: staging Use git add to stage changed files. For when you don't want to commit all changed files. $ git add index.html $ git add main.css $ git commit -m "Changed heading color" staging area: Copy of IFS file placed into separate area in prep for git commit. Think of staging as using the mouse to select 3 out of 10 files in Windows Explorer and right-clicking to select Copy. git-scm.com/docs/git-commit - Docs git-scm.com/docs/git-add - Docs Note: Command git commit -a is a shortcut to skip staging and directly commit working directory files.

12 create central repo Best practice to set up a central Git repo where everyone pushes and pulls. Create new repo on Bitbucket** or GitHub. Keep it private if you don't want the world to see. Note: IBM i can act as the central repository. Put it in a directory like /git in the IFS (or anywhere outside of all /home directories). ** We (KrengelTech) use BitBucket because it has unlimited private repositories. bitbucket.org - Free Git repo hosting

13 tutorial: connect local to remote Command git remote adds a named remote server; origin in this case. $ cd /home/aaron/website1 $ git remote add origin git@bitbucket.org:aaronbartell/website1.git Command git remote -v displays existing remote servers. $ git remote -v origin git@bitbucket.org:aaronbartell/website1.git (fetch) origin git@bitbucket.org:aaronbartell/website1.git (push) git-scm.com/docs/git-remote - Docs

14 tutorial: push Make local commits to your heart's content. To share, you git push to the remote server. Name of remote Name of branch $ git push origin master Counting objects: 4, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (4/4), 500 bytes 0 bytes/s, done. Total 4 (delta 0), reused 0 (delta 0) To git@bitbucket.org:aaronbartell/website1.git 05911c9..8f11b00 master -> master git-scm.com/docs/git-remote - Docs git-scm.com/docs/git-push - Docs The master branch is created for you by default.

15 ssh to communicate To communicate with Bitbucket via SSH you must provide your public SSH key. Password-less authentication. ssh-keygen creates necessary files $ ssh-keygen $ ls ~/.ssh authorized_keys id_rsa known_hosts id_rsa.pub SSH Copy/paste id_rsa.pub into Bitbucket web interface $ cat ~/.ssh/id_rsa.pub ssh-rsa AAAABxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxpomipqnexxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxlump4zhi4bqghil team@litmis.com ssh-keygen is contained in 5733SC1 IBM Portable Utilities for i5/os *BASE & Option 1 bit.ly/5733sc1-op1-5733sc1 instructions

16 tutorial: pull Command git pull will SSH to the named server (origin) and retrieve all existing commits into your local repo. $ git pull origin master remote: Counting objects: 3, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From bitbucket.org:aaronbartell/website1 * branch master -> FETCH_HEAD 8f11b00..2e4fa85 master -> origin/master Updating 8f11b00..2e4fa85 Fast-forward index.html file changed, 1 insertion(+) master is the "branch" name and is created by default when git init is run. We will not be covering branches as that is not necessarily an intro topic. git-scm.com/docs/git-commit - Docs

17 tutorial: pull and merge conflict When you git pull it automatically merges the remote commits with local ones. Excellent! "Merge Conflicts" are when developers change the same line of code and manual decisions need to be made as to what should be kept. $ git pull origin master From bitbucket.org:aaronbartell/website1 * branch master -> FETCH_HEAD Auto-merging index.html CONFLICT (content): Merge conflict in index.html Automatic merge failed; fix conflicts and then commit the result. $ cat index.html <<<<<<< HEAD <title>ibm i wins in the end. This much I know.</title> ======= <title>ibm i wins in the end. And so do you.</title> >>>>>>> 05911c9cdcc9a35bab362f9c1937b8b395d9a3b0 Red signifies the delimiters Git added. Manually remove delimiters and the code you DON'T want to keep. Lastly, run git add index.html and git commit to complete the merge conflict. git-scm.com/docs/git-commit - Docs

18 tutorial - log Command git log can be used to display commits that have taken place. $ git log --date-order commit 8f11b0025af864a734c57913a089bb19bbe0e78c Merge: f85cd c9 Author: Aaron Bartell <aaronbartell@gmail.com> Date: Wed Sep 23 20:39: Fixed merge conflict commit f85cd89d3f215abf53ef8652c9949ece48b295a0 Author: Aaron Bartell <aaronbartell@gmail.com> Date: Wed Sep 23 19:02: Added "This much I know." commit 05911c9cdcc9a35bab362f9c1937b8b395d9a3b0 Author: Aaron Bartell <aaronbartell@gmail.com> Date: Wed Sep 23 16:59: Added "And so do you." commit b4cfb9fe2ffd2c8bb10e567fb97c5f1368f30f5f Author: Aaron Bartell <aaronbartell@gmail.com> Date: Wed Sep 23 18:55: git-scm.com/docs/git-log - Docs initial commit

19 tutorial - show Command git show can be used to display one or more commits and their details. $ git show 05911c9cd commit 05911c9cdcc9a35bab362f9c1937b8b395d9a3b0 Author: Aaron Bartell <aaronbartell@gmail.com> Date: Wed Sep 23 16:59: Added "And so do you." diff --git a/index.html b/index.html index d..01dacd a/index.html <title>ibm i wins in the end</title> +<title>ibm i wins in the end. And so do you.</title> Shows changes to file in this commit git-scm.com/docs/git-show - Docs

20 tutorial - diff Command git diff can be used to review the changes in one or many files. I typically do git status to learn what files have changed and then git diff to see the changes. $ git diff index.html diff --git a/index.html b/index.html index e8d66c4..c a/index.html ,2 <title>ibm i wins in the end. And so do you.</title> -<p>something else</p> \ No newline at end of file +<h1>cloud</h1> +<p>ibm i has been doing cloud since before there was rain.</p> + +<p>get Git on your i</p> \ No newline at end of file git-scm.com/docs/git-diff - Docs

21 tutorial: status The git status is great for learning where things are currently at. I use it after I've been editing code for awhile to see what's been changed (including by code generators). $ echo "<title>ibm i wins in the end</title>" > index.html $ git status On branch master Initial commit Untracked files: (use "git add <file>..." to include in what will be committed) index.html nothing added to commit but untracked files present (use "git add" to track) $ git add index.html $ git status On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) Git supplies in-line context sensitive help. new file: index.html git-scm.com/docs/git-status - Docs

22 tutorial - stashes Middle of a change? Get interrupted and asked to work on something else? Stash it. Command git stash is like a big clipboard (i. e. Ctrl+C in Windows). It will take your current "dirty" files and save them and revert back to the most recent commit (aka HEAD). $ echo "an edit" >> index.html $ git status On branch master Changes not staged for commit: modified: index.html $ git stash Saved working directory and index state WIP on master: 2e4fa85 HEAD is now at 2e4fa85 $ git status On branch master nothing to commit, working directory clean $ git stash pop On branch master Changes not staged for commit: modified: index.html Dropped refs/stash@{0} (1b2cb0b2fe94974af444b20ea516c8daf22703ed) git-scm.com/docs/git-stash - Docs

23 fork and pull request litmis/ibmichroot fork Fork: Make a copy of repository and place in my profile on Bitbucket/Github Pull Request: Request my changes be accepted back into parent repository Why?: Allows formal review and integrates process flow. Not everyone should be allowed core comitter status. pull request aaronbartell/ibmichroot Steps: - Fork project - Make changes in your version and commit changes - Issue pull request ibmsystemsmag.com/ibmi/developer/general/how-to-contribute-to-open-source-projects - Example

24 (free) tooling Visual tooling makes all the aforementioned commands much simpler. Regardless, good to have foundation in the command. ungit - Uses Node.js runtime and resides on IBM i (what I use) SourceTree - Runs on laptop. GitHub Desktop - Runs on laptop github.com/fredriknoren/ungit - UnGit sourcetreeapp.com - SourceTree desktop.github.com - GitHub Desktop

25 ungit The ungit tool simplifies Git repositories in visual fashion. No more typing commands. Runs on IBM i. We use ungit on spaces.litmis.com github.com/fredriknoren/ungit - Repo

26 ungit Easily see what you are putting into a commit. github.com/fredriknoren/ungit - Repo

27 ungit See full history of past commits

28 ungit Context sensitive actions (i.e. Checkout, Delete) Here we also see our local repo is behind the central repository This dotted line goes down to the most recent local commit. This is how we know the remote server is further ahead than the local repo.

29 directory structure NOTE: To start using Git you don't need to know how its internals work. The.git directory sits at the root of a Git controlled directory and holds the object database. The object database has four types of objects: commit: Stores who made the commit, references to the tree and blob files tree: blob: Stores your actual code, an image file, etc. tag: Allows you to mark a particular commit with a name (i.e. v1.0.1) commit, tree or blob; compressed with zlib $ find.git/.git/objects/39/37f47bff964feb7936fd2ea8a7a3c3dab4e25e.git/objects/ca/cac6e781a28d761bbd13663ce546f2fc8ae25b.git/objects/ca/3db7182f5b01b8f0f9c19dc3c23d1af76a161b.git/objects/28/0be8e595afc9d4427e16e b874e20b.git/objects/28/ bf47b7413f6a6dab91148bd8a3758fd.git/objects/57/e1b4e6cd88a461349c9e4243c20f26580ceb50.git/objects/ae/804bc6df269484a74df9e9ac6c0a73832f5c35 nfarina.com/post/ /git-is-simpler - Understanding how git stores things

30 resources litmis.com/articles has the most up to date resources Git to Bit(bucket), MC Press Online on 8/28/15 Installing Git on IBM i, MC Press Online on 7/31/15 How to Contribute to Open Source Projects, IBM Systems Magazine on 7/14/15 IBM i Toolkit for Ruby iit for short, IT Jungle on 4/7/15 Git to GitHub, IT Jungle on 3/3/15 Git To It, IT Jungle on 2/10/15 Common Git commands from community member:

31 We Have Reached The End! Now...Get Engaged! 1. Visit litmis.com regularly for new content 2. on Twitter 3. Contact me directly for assistance jumpstarting any open source development projects on IBM i at albartell@krengeltech.com

2 Initialize a git repository on your machine, add a README file, commit and push

2 Initialize a git repository on your machine, add a README file, commit and push BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal

More information

Revision Control and GIT

Revision Control and GIT Revision Control and GIT On UD HPC Community Clusters William Totten Network & Systems Services Why use revision control You can go back in time It makes it easy to try things out which might not work

More information

Linus Torvalds inventor of Linux wanted a better source control system so he wrote one

Linus Torvalds inventor of Linux wanted a better source control system so he wrote one Constellations on i Orion, Git and RPG Jesse Gorzinski jgorzins@us.ibm.com IBM i Emerging Solutions Git what is it? Linus Torvalds inventor of Linux wanted a better source control system so he wrote one

More information

Windows. Everywhere else

Windows. Everywhere else Git version control Enable native scrolling Git is a tool to manage sourcecode Never lose your coding progress again An empty folder 1/30 Windows Go to your programs overview and start Git Bash Everywhere

More information

Version Control with GIT

Version Control with GIT Version Control with GIT Benjamin Roth CIS LMU München Benjamin Roth (CIS LMU München) Version Control with GIT 1 / 30 Version Control Version control [...] is the management of changes to documents, computer

More information

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

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48 Git and GitHub Dan Wysocki February 12, 2015 Dan Wysocki Git and GitHub February 12, 2015 1 / 48 1 Version Control 2 Git 3 GitHub 4 Walkthrough Dan Wysocki Git and GitHub February 12, 2015 2 / 48 Version

More information

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017 GETTING STARTED WITH Michael Lessard Senior Solutions Architect June 2017 Agenda What is Git? Installation of Git Git basis Github First steps with Git 2 WHAT IS GIT? What is Git? Started in 2005 Created

More information

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014 EECS 470 Lab 4 Version Control System Department of Electrical Engineering and Computer Science College of Engineering University of Michigan Friday, 31 st January, 2014 (University of Michigan) Lab 4:

More information

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP Git Guide Meher Krishna Patel Created on : Octorber, 2017 Last updated : October, 2018 More documents are freely available at PythonDSP Table of contents Table of contents i 1 Commands Summary 1 2 Git

More information

Introduction to GIT. Jordi Blasco 14 Oct 2011

Introduction to GIT. Jordi Blasco 14 Oct 2011 Jordi Blasco (jblasco@xrqtc.com) 14 Oct 2011 Agenda 1 Project information Who is ussing GIT 2 Branch Tag Data Transport Workow 3 Congure 4 Working with remotes 5 Project information Who is ussing GIT Project

More information

Submitting your Work using GIT

Submitting your Work using GIT Submitting your Work using GIT You will be using the git distributed source control system in order to manage and submit your assignments. Why? allows you to take snapshots of your project at safe points

More information

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011)

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011) Basic Agenda 1 Project information Who is ussing 2 14 Oct 2011 3 Basic Data Transport Work ow 4 Con gure 5 Basic Project information Who is ussing Project information Who is ussing Project information

More information

So#ware(Project. Lecture'4. Wouter'Swierstra. So#ware(project( (Lecture(4 1

So#ware(Project. Lecture'4. Wouter'Swierstra. So#ware(project( (Lecture(4 1 So#ware(Project Lecture'4 Wouter'Swierstra So#ware(project( (Lecture(4 1 Last%&me Risks So(ware-architecture So#ware(project( (Lecture(4 2 Working(effec,vely(with(git(and(GitHub. So#ware(project( (Lecture(4

More information

Aaron Bartell Director of IBM i Innovation

Aaron Bartell Director of IBM i Innovation Watson IBM i WebSockets Aaron Bartell Director of IBM i Innovation albartell@krengeltech.com Copyright 2015 Aaron Bartell This session brought to you by... Consulting - Jumpstart your open source pursuit.

More information

git the SCM system Jan-Simon Möller training.linuxfoundation.org

git the SCM system Jan-Simon Möller training.linuxfoundation.org git the SCM system Jan-Simon Möller training.linuxfoundation.org Topics What is git (what is a SCM) How to install git How to personalize git How to use git for development What is git? What is a SCM System?

More information

How to be a git. Dominic Mitchell

How to be a git. Dominic Mitchell How to be a git Dominic Mitchell Git! It s new! Everybody s talking about it! What is it? Distributed Version Control Why Git? Fast Local Toolkit Widely used Github Toolkit lets other people build tools

More information

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014 Git Tutorial Version: 0.2 Anders Nilsson andersn@control.lth.se April 1, 2014 1 Introduction Why use git, or any other version control software to keep track of files? In short there are at least three

More information

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi) A Brief Introduction to Git Sylverie Herbert (based on slides by Hautahi Kingi) Introduction Version control is better than mailing files back and forth because: Nothing that is committed to version control

More information

Software Engineering

Software Engineering Software Engineering CSC 331/631 - Spring 2018 Version Control with Git Paul Pauca March 27 SE Theory: Version Control Systems Link to video lectures (Soft Dev Proc part 1 of 3) Watch these short videos

More information

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes Git Charles J. Geyer School of Statistics University of Minnesota Stat 8054 Lecture Notes 1 Before Anything Else Tell git who you are. git config --global user.name "Charles J. Geyer" git config --global

More information

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

A quick (and maybe practical) guide to Git and version control. By Jay Johnson A quick (and maybe practical) guide to Git and version control By Jay Johnson Necessary shout outs and reference links from slides from CSE 380 with Dr. Chris Simmons (UT-Austin) and notes from Prof. Jean-Luc

More information

Version Control: Gitting Started

Version Control: Gitting Started ting Started Cai Li October 2014 What is Version Control? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Local Version

More information

Introduction to Git and Github

Introduction to Git and Github Introduction to Git and Github Computing in Optimization and Statistics: Lecture 1 Jackie Baek MIT January 10, 2017 What is git and GitHub? git is a version control system. Other version control systems

More information

DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM GIT WITH MATTHEW REIDSMA GRAND VALLEY STATE UNIVERSITY

DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM GIT WITH MATTHEW REIDSMA GRAND VALLEY STATE UNIVERSITY DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM WITH GIT MATTHEW REIDSMA GRAND VALLEY STATE UNIVERSITY WHO DOESN T USE VERSION CONTROL? VERSION CONTROL WHO? OH BOY. WHY YOU NEED VERSION CONTROL GIT GIT WHY GIT

More information

1/20/13 Git tutorial. Git tutorial. Mike Nolta. file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31

1/20/13 Git tutorial. Git tutorial. Mike Nolta. file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31 Git tutorial Mike Nolta file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31 1. Basics file:///users/nolta/github/reveal.js/git.html?print-paper#/ 2/31 Tell git who you are $ git config --global

More information

Git: Distributed Version Control

Git: Distributed Version Control Git: Distributed Version Control Computer Science and Engineering College of Engineering The Ohio State University Lecture 3 Demo Prep: Empty (but initialized) repo Linear development: Create, edit, rename,

More information

Index. Alias syntax, 31 Author and commit attributes, 334

Index. Alias syntax, 31 Author and commit attributes, 334 Index A Alias syntax, 31 Author and commit attributes, 334 B Bare repository, 19 Binary conflict creating conflicting changes, 218 during merging, 219 during rebasing, 221 Branches backup, 140 clone-with-branches

More information

Revision control. INF5750/ Lecture 2 (Part I)

Revision control. INF5750/ Lecture 2 (Part I) Revision control INF5750/9750 - Lecture 2 (Part I) Problem area Software projects with multiple developers need to coordinate and synchronize the source code Approaches to version control Work on same

More information

FEEG Applied Programming 3 - Version Control and Git II

FEEG Applied Programming 3 - Version Control and Git II FEEG6002 - Applied Programming 3 - Version Control and Git II Richard Boardman, Sam Sinayoko 2016-10-19 Outline Learning outcomes Working with a single repository (review) Working with multiple versions

More information

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

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic - basics Matthäus Zloch GESIS Outline for this session Git introduction and some theory Git command basics (plus some little advanced)

More information

Human-Computer Interaction Design

Human-Computer Interaction Design Human-Computer Interaction Design COGS120/CSE170 - Intro. HCI Instructor: Philip Guo, Lab TA: Sean Kross Lab 1 - Version control and HTML (2017-10-06) by Michael Bernstein, Scott Klemmer, Philip Guo, and

More information

Git, the magical version control

Git, the magical version control Git, the magical version control Git is an open-source version control system (meaning, it s free!) that allows developers to track changes made on their code files throughout the lifetime of a project.

More information

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015 Git all meaningful operations can be expressed in terms of the rebase command -Linus Torvalds, 2015 a talk by alum Ross Schlaikjer for the GNU/Linux Users Group Sound familiar? add commit diff init clone

More information

Software Project (Lecture 4): Git & Github

Software Project (Lecture 4): Git & Github Software Project (Lecture 4): Git & Github Wouter Swierstra, Atze Dijkstra Feb 2016 Wouter Swierstra, Atze Dijkstra Software Project (Lecture 4): Git & Github Feb 2016 1 / 45 Wouter Swierstra, Atze Dijkstra

More information

Source Code Management wih git

Source Code Management wih git Source Code Management wih git Matthieu Herrb December 22 http://homepages.laas.fr/matthieu/cours/git.pdf Licence This work is licensed under a Creative Commons Attribution-ShareAlike 3. Unported License.

More information

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 Git Tutorial André Sailer CERN-EP-LCD ILD Technical Meeting April 24, 2017 LD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 2/36

More information

Git Introduction CS 400. February 11, 2018

Git Introduction CS 400. February 11, 2018 Git Introduction CS 400 February 11, 2018 1 Introduction Git is one of the most popular version control system. It is a mature, actively maintained open source project originally developed in 2005 by Linus

More information

Getting the Source Code

Getting the Source Code Getting the Source Code The CORD source code is available from our Gerrit system at gerrit.opencord.org. Setting up a Gerrit account and ssh access will also enable you to submit your own changes to CORD

More information

Human-Computer Interaction Design

Human-Computer Interaction Design Human-Computer Interaction Design COGS120/CSE170 - Intro. HCI Instructor: Philip Guo Lab 1 - Version control and HTML (2018-10-03) by Michael Bernstein, Scott Klemmer, Philip Guo, and Sean Kross [Announce

More information

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

How to version control like a pro: a roadmap to your reproducible & collaborative research How to version control like a pro: a roadmap to your reproducible & collaborative research The material in this tutorial is inspired by & adapted from the Software Carpentry lesson on version control &

More information

CSE 391 Lecture 9. Version control with Git

CSE 391 Lecture 9. Version control with Git CSE 391 Lecture 9 Version control with Git slides created by Ruth Anderson & Marty Stepp, images from http://git-scm.com/book/en/ http://www.cs.washington.edu/391/ 1 Problems Working Alone Ever done one

More information

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

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2 Git Git 1 Topics covered Introduction to Git Git workflows Git key concepts Hands on session Branching models Git 2 Introduction to Git Git 3 Version control systems The source files of a project changes

More information

Improving Your Life With Git

Improving Your Life With Git Improving Your Life With Git Lizzie Lundgren elundgren@seas.harvard.edu Graduate Student Forum 26 April 2018 Scenarios to Avoid My code was deleted from 90-day retention! Crap, I can t remember what I

More information

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

What is Git? What is Git? Version Control. Barry Grant What is Git? (1) An unpleasant or contemptible person. Often incompetent, annoying, senile, elderly or childish in character. Barry Grant bjgrant@ucsd.edu http://thegrantlab.org (2) A modern distributed

More information

Git. Presenter: Haotao (Eric) Lai Contact:

Git. Presenter: Haotao (Eric) Lai Contact: Git Presenter: Haotao (Eric) Lai Contact: haotao.lai@gmail.com 1 Acknowledge images with white background is from the following link: http://marklodato.github.io/visual-git-guide/index-en.html images with

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit Gerrit About the Tutorial Gerrit is a web-based code review tool, which is integrated with Git and built on top of Git version control system (helps developers to work together and maintain the history

More information

Version Control System - Git. zswu

Version Control System - Git. zswu Version Control System - Git zswu Overview Why VCS? Why Git? Using Git Personally Using Git with Others Etiquette Rules of Using Git Tools & Services Tips 2 Why VCS (1/3) How do you manage your homework?

More information

Git for Newbies. ComMouse Dongyue Studio

Git for Newbies. ComMouse Dongyue Studio Git for Newbies ComMouse Dongyue Studio 2018.4.25 Contents What is Git? Git Quick Start Git Branch Git Workflow Git in Practice What is Git? What is Git? A Version Control System (VCS) An Open-sourced

More information

Lab Exercise Git: A distributed version control system

Lab Exercise Git: A distributed version control system Lunds tekniska högskola Datavetenskap, Nov 21, 2016 EDAF45 Programvaruutveckling i grupp projekt Labb 2 (Git): Labbhandledning Checked on Git versions: 2.7.4 Lab Exercise Git: A distributed version control

More information

Introduction to distributed version control with git

Introduction to distributed version control with git Institut für theoretische Physik TU Clausthal 04.03.2013 Inhalt 1 Basics Differences to Subversion Translation of commands 2 Config Create and clone States and workflow Remote repos Branching and merging

More information

How to git with proper etiquette

How to git with proper etiquette How to git with proper etiquette Let's start fixing how we use git here in crew so our GitHub looks even more awesome and you all get experience working in a professional-like git environment. How to use

More information

Assumptions. GIT Commands. OS Commands

Assumptions. GIT Commands. OS Commands Many of the world s largest dev teams have adopted Git and it s not hard to see why It can handle small and large projects easily It has a tiny footprint It outclasses other version control tools It s

More information

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

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering GIT A free and open source distributed version control system User Guide January, 2018 Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Table of Contents What is

More information

Chapter 5. Version Control: Git

Chapter 5. Version Control: Git Chapter 5 Version Control: Git The Replication Crisis continues to heat up discussion across social science. Hence principled researchers want to make their work easy to replicate and reputable journals

More information

John DeDourek Professor Emeritus Faculty of Computer Science University of New Brunswick GIT

John DeDourek Professor Emeritus Faculty of Computer Science University of New Brunswick GIT John DeDourek Professor Emeritus Faculty of Computer Science University of New Brunswick GIT What is Git? A source code control system Implies program code A version control system Implies any sort of

More information

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

CS 520: VCS and Git. Intermediate Topics Ben Kushigian CS 520: VCS and Git Intermediate Topics Ben Kushigian https://people.cs.umass.edu/~rjust/courses/2017fall/cs520/2017_09_19.zip Our Goal Our Goal (Overture) Overview the basics of Git w/ an eye towards

More information

Git & Github Fundamental by Rajesh Kumar.

Git & Github Fundamental by Rajesh Kumar. Git & Github Fundamental by Rajesh Kumar About me Rajesh Kumar DevOps Architect @RajeshKumarIN www.rajeshkumar.xyz www.scmgalaxy.com 2 What is git Manage your source code versions Who should use Git Anyone

More information

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

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Version Control September 18, 2018 Thursday (September 20) First in-class exercise On using git (today is a prelude with useful

More information

Git. A Distributed Version Control System. Carlos García Campos

Git. A Distributed Version Control System. Carlos García Campos Git A Distributed Version Control System Carlos García Campos carlosgc@gnome.org Carlos García Campos carlosgc@gnome.org - Git 1 A couple of Quotes For the first 10 years of kernel maintenance, we literally

More information

Lab 1 1 Due Wed., 2 Sept. 2015

Lab 1 1 Due Wed., 2 Sept. 2015 Lab 1 1 Due Wed., 2 Sept. 2015 CMPSC 112 Introduction to Computer Science II (Fall 2015) Prof. John Wenskovitch http://cs.allegheny.edu/~jwenskovitch/teaching/cmpsc112 Lab 1 - Version Control with Git

More information

Git version control with Eclipse (EGit) Tutorial

Git version control with Eclipse (EGit) Tutorial Git version control with Eclipse (EGit) Tutorial 출처 : Lars Vogel http://www.vogella.com/tutorials/eclipsegit/article.html Lars Vogel Version 3.6 Copyright 2009, 2010, 2011, 2012, 2013, 2014 Lars Vogel

More information

Git for Version Control

Git for Version Control Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from http://git-scm.com/book/en/ http://www.cs.washington.edu/403/ About

More information

Version control. what is version control? setting up Git simple command-line usage Git basics

Version control. what is version control? setting up Git simple command-line usage Git basics Version control what is version control? setting up Git simple command-line usage Git basics Version control - intro ensure we keep track of changes, updates, contributions, suggested mods... could try

More information

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY 1 WHAT IS VERSION CONTROL? Management of changes to documents like source code, scripts, text files Provides the ability to check documents in

More information

Version control with Git.

Version control with Git. 1 Version control with Git http://git-scm.com/book/en/ Basic Intro to Git We will: Discuss how Git differs from Subversion Discuss the basic Git model Pull/clone files from a repository on github Edit

More information

Fundamentals of Git 1

Fundamentals of Git 1 Fundamentals of Git 1 Outline History of Git Distributed V.S Centralized Version Control Getting started Branching and Merging Working with remote Summary 2 A Brief History of Git Linus uses BitKeeper

More information

Barry Grant

Barry Grant Barry Grant bjgrant@umich.edu http://thegrantlab.org What is Git? (1) An unpleasant or contemptible person. Often incompetent, annoying, senile, elderly or childish in character. (2) A modern distributed

More information

TDDC88 Lab 4 Software Configuration Management

TDDC88 Lab 4 Software Configuration Management TDDC88 Lab 4 Software Configuration Management Introduction "Version control is to programmers what the safety net is to a trapeze artist. Knowing the net is there to catch them if they fall, aerialists

More information

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

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Table of Contents Preparation... 3 Exercise 1: Create a repository. Use the command line.... 4 Create a repository...

More information

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison Version control with git and GitHub Karl Broman Biostatistics & Medical Informatics, UW Madison kbroman.org github.com/kbroman @kwbroman Course web: kbroman.org/tools4rr Slides prepared with Sam Younkin

More information

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

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY AGENDA Version control overview Introduction and basics of Git Advanced Git features Collaboration Automation

More information

Git tutorial. Katie Osterried C2SM. October 22, 2015

Git tutorial. Katie Osterried C2SM. October 22, 2015 Git tutorial Katie Osterried C2SM October 22, 2015 Outline 1 What is Git and why are we switching? 2 Working with Git 3 Branching and Merging 4 Working with remote repositories 5 Recommendations Outline

More information

Code and data management with Git

Code and data management with Git Code and data management with Git Git and remote repositories Jonathan K. Vis Department of Human Genetics Remote repositories Table of contents Remote repositories Transferring commits between repositories

More information

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

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY 1 REVERTING CHANGES 2 REVERTING CHANGES Change local files git reset git checkout Revert a commit in the branch history git revert Reset

More information

Version control with git and Rstudio. Remko Duursma

Version control with git and Rstudio. Remko Duursma Version control with git and Rstudio Remko Duursma November 14, 2017 Contents 1 Version control with git 2 1.1 Should I learn version control?...................................... 2 1.2 Basics of git..................................................

More information

Distributed Version Control (with Git)

Distributed Version Control (with Git) Distributed Version Control (with Git) Introduction and Tutorial fhlug 24. 03. 2011 Why Distributed? No single point of failure Automatic backups Fast local operations (log, diff, checkout, ) Authenticity

More information

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

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies Git better Collaborative project management using Git and GitHub Matteo Sostero March 13, 2018 Sant Anna School of Advanced Studies Let s Git it done! These slides are a brief primer to Git, and how it

More information

! #Running this command from the top directory of your project will add all your changes."! $ git add."

! #Running this command from the top directory of your project will add all your changes.! $ git add. ********************************* ********************************* ** ** ** Git Toolkit ** ** ** ********************************* ********************************* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

More information

GIT VERSION CONTROL TUTORIAL. William Wu 2014 October 7

GIT VERSION CONTROL TUTORIAL. William Wu 2014 October 7 GIT VERSION CONTROL TUTORIAL William Wu w@qed.ai 2014 October 7 ABOUT ME Scientific Computing Specialist background: math, cs, ee interests: machine learning, DSP, imaging, data viz, cloud work: various

More information

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

The Old World. Have you ever had to collaborate on a project by What the Git? The Old World Have you ever had to collaborate on a project by Shuttling a USB drive back and forth Using Dropbox E-mailing your document around Have you ever accidentally deleted someone

More information

Git: Distributed Version Control

Git: Distributed Version Control Git: Distributed Version Control Computer Science and Engineering College of Engineering The Ohio State University Lecture 3 What Does "D" Stand For? Distributed version control Multiple people, distributed

More information

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

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1 GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1 WHO AM I? @tushar_rishav GSoC'16 student contributing to coala - a static code analysis tool, under Python So ware Foundation. A senior

More information

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU Lab 01 How to Survive & Introduction to Git Web Programming DataLab, CS, NTHU Notice These slides will focus on how to submit you code by using Git command line You can also use other Git GUI tool or built-in

More information

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. Git AN INTRODUCTION Introduction to Git as a version control system: concepts, main features and practical aspects. How do you share and save data? I m working solo and I only have one computer What I

More information

Version Control. Version Control

Version Control. Version Control Version Control Prepared for CS 342 - Software Design by John Bell Based on slides prepared by Jason Leigh for CS 340 University of Illinois at Chicago Version Control Incredibly important when working

More information

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. Git AN INTRODUCTION Introduction to Git as a version control system: concepts, main features and practical aspects. How do you share and save data? I m working solo and I only have one computer What I

More information

GIT DISTRIBUTED IS THE NEW CENTRALISED

GIT DISTRIBUTED IS THE NEW CENTRALISED GIT DISTRIBUTED IS THE NEW CENTRALISED BEGINNER WORKSHOP FETCH YOURSELF LAPTOP INSTALLING linux: sudo apt-get install git linux: sudo yum install git osx: brew install git osx: macports install git windows:

More information

GIT tutorial. David Parsons, Soraya Arias, Thomas Calmant November, Preamble 2

GIT tutorial. David Parsons, Soraya Arias, Thomas Calmant November, Preamble 2 GIT tutorial David Parsons, Soraya Arias, Thomas Calmant November, 2017 Contents 1 Preamble 2 2 First steps 2 2.1 Basic configuration.......................................... 2 2.2 Create your very first

More information

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová, GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová, 25.4.2016 Basic features Distributed version control Developed in 2005, originally for Linux kernel development Free, GNU General Public License version

More information

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

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git Versioning with git Moritz August 13.03.2017 Git/Bash/Python-Course for MPE 1 Agenda What s git and why is it good? The general concept of git It s a graph! What is a commit? The different levels Remote

More information

Effective Programming Practices for Economists. 7. Version Control, Part II: Git with a Shared Repository

Effective Programming Practices for Economists. 7. Version Control, Part II: Git with a Shared Repository Effective Programming Practices for Economists 7. Version Control, Part II: Git with a Shared Repository Hans-Martin von Gaudecker Department of Economics, Universität Bonn Collaboration Science in general

More information

#25. Use Source Control in a Single- Developer Environment

#25. Use Source Control in a Single- Developer Environment #25. Use Source Control in a Single- Developer Environment How Do I...? Part 1: Install Source Control 1. Browse to the ClassFiles folder on your desktop, and then double-click Git-[version]- preview-[date].exe.

More information

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Common Git Commands Git Crash Course Teon Banek theongugl@gmail.com April 7, 2016 Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Outline 1 Introduction About Git Setup 2 Basic Usage Trees Branches

More information

Intro to Linux & Command Line

Intro to Linux & Command Line Intro to Linux & Command Line Based on slides from CSE 391 Edited by Andrew Hu slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson http://www.cs.washington.edu/391/ 1 Lecture summary

More information

Git(Lab) Tutorial and Hands-On

Git(Lab) Tutorial and Hands-On Git(Lab) Tutorial and Hands-On Analysis Workshop 34th KATRIN Collaboration Meeting Institut für Kernphysik WWU Münster 21.02.2018 Git(Lab) Tutorial and Hands-On Or: Why branches aren t homeomorphic endofunctors

More information

Introduction to Version Control with Git and GitHub

Introduction to Version Control with Git and GitHub Introduction to Version Control with Git and GitHub David Luet Princeton University PICSciE, Research Computing/OIT, Geosciences July 10, 2017 Outline Version Control Systems (VCS) Definition Different

More information

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

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; Why should I use a VCS? Repositories Types of repositories: Private - only you and the

More information

Tizen Project Guideline. SKKU Embedded Software Lab.

Tizen Project Guideline. SKKU Embedded Software Lab. 1 Tizen Project Guideline Tizen Project Process 2 Assume that you have done flashing Tizen images. 1. Preparation Install Tizen Development Environments 2. Github 1. Sign in Github 2. Make an Organization

More information

From Commits to Collaboration: A Git Tutorial for Social Scientists

From Commits to Collaboration: A Git Tutorial for Social Scientists From Commits to Collaboration: A Git Tutorial for Social Scientists Paul Sangrey, University of Pennsylvania December 12, 2017 The Replication Crisis continues to heat up discussion across social science.

More information