Top Banner
www.atmire.com + Bram Luyten Ignace Deroost
111
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Git and Github - a 90 Minute interactive workshop

www.atmire.com

+

Bram LuytenIgnace Deroost

Page 2: Git and Github - a 90 Minute interactive workshop

OUTLINE

Version control and Git

Interactive walkthrough

Ten killer features

Companies

Open Source projects

Under the hood

Page 3: Git and Github - a 90 Minute interactive workshop

But first...

Page 4: Git and Github - a 90 Minute interactive workshop

What’s the key to your professor’s next promotion?

(Assuming he or she is not up for a Nobel Prize or a Fields Medal)

Page 5: Git and Github - a 90 Minute interactive workshop

Publications

Page 6: Git and Github - a 90 Minute interactive workshop
Page 7: Git and Github - a 90 Minute interactive workshop

PUBLICATIONS

Originally on paper

Now largely digital

Content provided by academics

Reviews provided by academics

Page 8: Git and Github - a 90 Minute interactive workshop

THE PUBLISHING INDUSTRY

Page 9: Git and Github - a 90 Minute interactive workshop

THE PUBLISHING INDUSTRY

Originally charged for shipping paper copies

Now charges for digital access

Private enterprise

Page 10: Git and Github - a 90 Minute interactive workshop

OUR TAX MONEY

Page 11: Git and Github - a 90 Minute interactive workshop

OUR TAX MONEY

Pays for researchers to do research

Pays for researchers providing reviews

Pays publishers for access to scientific results that we funded in the first place?

Page 12: Git and Github - a 90 Minute interactive workshop

http://www.dspace.org

Page 13: Git and Github - a 90 Minute interactive workshop

DSPACE

A free and open source web platform

Used by universities and public institutions to offer free and open access to the (scientific) output they produce.

@mire provides DSpace installation, support, customization and training services.

Page 14: Git and Github - a 90 Minute interactive workshop

THE WORLD BANKhttps://openknowledge.worldbank.org/

Page 15: Git and Github - a 90 Minute interactive workshop

DRYADhttp://datadryad.org/

Page 16: Git and Github - a 90 Minute interactive workshop

ENVIAhttp://www.envia.bl.uk/

Page 17: Git and Github - a 90 Minute interactive workshop

WORKING FOR @MIRE

Join our team of in Belgium or USA

Developer and Project Manager vacancies

Free snacks

Page 18: Git and Github - a 90 Minute interactive workshop

First month on the job

Page 19: Git and Github - a 90 Minute interactive workshop

Spot the founders

Page 20: Git and Github - a 90 Minute interactive workshop

Bubble friday

Page 21: Git and Github - a 90 Minute interactive workshop

Funtivities

Page 22: Git and Github - a 90 Minute interactive workshop

Version control

Page 23: Git and Github - a 90 Minute interactive workshop
Page 24: Git and Github - a 90 Minute interactive workshop
Page 25: Git and Github - a 90 Minute interactive workshop

Attribution

Page 26: Git and Github - a 90 Minute interactive workshop
Page 27: Git and Github - a 90 Minute interactive workshop
Page 28: Git and Github - a 90 Minute interactive workshop

When and Why

Page 29: Git and Github - a 90 Minute interactive workshop

Examples

Page 30: Git and Github - a 90 Minute interactive workshop
Page 31: Git and Github - a 90 Minute interactive workshop
Page 32: Git and Github - a 90 Minute interactive workshop

Who

Page 33: Git and Github - a 90 Minute interactive workshop

When

Page 34: Git and Github - a 90 Minute interactive workshop

Why

Page 35: Git and Github - a 90 Minute interactive workshop
Page 36: Git and Github - a 90 Minute interactive workshop
Page 37: Git and Github - a 90 Minute interactive workshop

Where can you find the “Why” in Google Docs?

Page 38: Git and Github - a 90 Minute interactive workshop

WHAT ARE GIT AND GITHUB

Decentralized source code management protocol

Free web based software project hosting

Git is used as underlying source code management protocol

Page 39: Git and Github - a 90 Minute interactive workshop

CENTRALIZED SOURCE CODE MANAGEMENT

Page 40: Git and Github - a 90 Minute interactive workshop

GIT: DECENTRALIZED VERSION CONTROL

Page 41: Git and Github - a 90 Minute interactive workshop

WHAT YOU NEED TO KNOW FOR NOW

Everything is local

Fast

Compact

Clever mechanisms to “merge” changes together

Page 42: Git and Github - a 90 Minute interactive workshop
Page 43: Git and Github - a 90 Minute interactive workshop

A social webapp for managing Git repositories

Page 44: Git and Github - a 90 Minute interactive workshop

https://github.com/fat

Page 45: Git and Github - a 90 Minute interactive workshop

https://github.com/twitter

Page 46: Git and Github - a 90 Minute interactive workshop

https://github.com/KULeuven-CS

Page 48: Git and Github - a 90 Minute interactive workshop

USING GIT AND GITHUB

Creating an account on Github

Contributing through the Github Web UI

Installing Git on your laptop

Using Git on Windows

Page 49: Git and Github - a 90 Minute interactive workshop

CREATING AN ACCOUNT ON GITHUB.COM

Signup on Github.com

Page 50: Git and Github - a 90 Minute interactive workshop

FORK THE PROJECT FOR THIS WORKSHOPhttps://github.com/bram-atmire/aft-workshop

Page 51: Git and Github - a 90 Minute interactive workshop

MODIFYING THE CODE IN YOUR OWN FORKCreate a new branch. Do NOT work on master

Ignace - update screenshot

Page 52: Git and Github - a 90 Minute interactive workshop

EDIT README.MDStandard mode

Page 53: Git and Github - a 90 Minute interactive workshop

EDIT README.MDFull screen mode

Page 54: Git and Github - a 90 Minute interactive workshop

PREVIEW: OVERVIEW OF CHANGESRed line: deleted - Green line: added

Page 55: Git and Github - a 90 Minute interactive workshop
Page 56: Git and Github - a 90 Minute interactive workshop
Page 57: Git and Github - a 90 Minute interactive workshop

EXERCISE

Install the Mac, Windows or command line client

Clone the fork of the AFT workshop repository on your local machine

Edit the README.md file locally and commit

Push this to your own Github repository

Issue a pull request with your changes

Page 58: Git and Github - a 90 Minute interactive workshop

SOMETHING A LITTLE MORE ADVANCED

http://bit.ly/learning-git

Page 59: Git and Github - a 90 Minute interactive workshop

Ten Killer Features

Page 60: Git and Github - a 90 Minute interactive workshop

1. .patch and .diff anywhere

Page 61: Git and Github - a 90 Minute interactive workshop
Page 62: Git and Github - a 90 Minute interactive workshop
Page 63: Git and Github - a 90 Minute interactive workshop

2. Press t for file finder

Page 64: Git and Github - a 90 Minute interactive workshop
Page 65: Git and Github - a 90 Minute interactive workshop

3. Press ? for shortcuts

Page 66: Git and Github - a 90 Minute interactive workshop
Page 67: Git and Github - a 90 Minute interactive workshop

4. Blame view

Page 68: Git and Github - a 90 Minute interactive workshop
Page 69: Git and Github - a 90 Minute interactive workshop

5. Line based comments

Page 70: Git and Github - a 90 Minute interactive workshop
Page 71: Git and Github - a 90 Minute interactive workshop

6. Project Stats

Page 72: Git and Github - a 90 Minute interactive workshop
Page 73: Git and Github - a 90 Minute interactive workshop

7. Git.io web publishing

Page 74: Git and Github - a 90 Minute interactive workshop
Page 75: Git and Github - a 90 Minute interactive workshop
Page 76: Git and Github - a 90 Minute interactive workshop

8. Git based deployment

Page 77: Git and Github - a 90 Minute interactive workshop
Page 78: Git and Github - a 90 Minute interactive workshop
Page 79: Git and Github - a 90 Minute interactive workshop

9. .gitignore

Page 80: Git and Github - a 90 Minute interactive workshop
Page 81: Git and Github - a 90 Minute interactive workshop

10. Cherry-Pick !

Page 82: Git and Github - a 90 Minute interactive workshop
Page 83: Git and Github - a 90 Minute interactive workshop

Companies

Page 85: Git and Github - a 90 Minute interactive workshop

TL;DR

Firm belief in simple tools

Developer freedom

Working asynchronously

Get rid of useless meetings

Page 86: Git and Github - a 90 Minute interactive workshop

GOOGLE

Page 87: Git and Github - a 90 Minute interactive workshop

PAYPAL

Page 88: Git and Github - a 90 Minute interactive workshop

ICELANDIC LAWS

Page 89: Git and Github - a 90 Minute interactive workshop

Branching Model

Page 91: Git and Github - a 90 Minute interactive workshop
Page 92: Git and Github - a 90 Minute interactive workshop
Page 93: Git and Github - a 90 Minute interactive workshop

Open Source

Page 94: Git and Github - a 90 Minute interactive workshop

OPEN SOURCE CONTRIBUTION WORKFLOW

Lowering your own maintenance costs

Prestige and achievement

Giving & receiving community support

Learn from others

Fun

Page 95: Git and Github - a 90 Minute interactive workshop

BUG TRACKING AND FEATURE REQUESTS

http://jira.duraspace.org/browse/DS

Page 96: Git and Github - a 90 Minute interactive workshop

CREATING A NEW JIRA ISSUE

Page 97: Git and Github - a 90 Minute interactive workshop

HIGHLEVEL DSPACE GITHUB WORKFLOW

“Fork”Contributor copies the DSpace code repository to his/her own Github account

“Clone”Checks out a local copy of the newly created fork

“Branch”Creates a branch for development work related to a particular issue in JIRA

“Commit”Modifying the code locally

“Publish Branch”Pushing your changes to your personal Github account

Page 98: Git and Github - a 90 Minute interactive workshop

FINAL STEP: FIRING YOUR PULL REQUEST

Done! Your code can now beevaluated for inclusion

Page 99: Git and Github - a 90 Minute interactive workshop

AFTER FIRING THE PULL REQUEST

Generally, code will be evaluated by 2 committers prior to inclusion

Further discussion about your approach can follow on JIRA or in Github comments

You can help the committers by doing your own evaluation on pull requests by others

Page 100: Git and Github - a 90 Minute interactive workshop

Google Code ✝25/01/2016

Bitbucket

Sourceforge

GitHub

OPEN SOURCE VERSION CONTROL PLATFORMS

Page 101: Git and Github - a 90 Minute interactive workshop

GOOGLE CODE

°2006

project hosting service

people started moving to GitHub

2015: google migrates their own repositories to GitHub

25/01/2016: end of Google Code

Page 102: Git and Github - a 90 Minute interactive workshop

BITBUCKET

Page 103: Git and Github - a 90 Minute interactive workshop

SOURCEFORGE

Page 104: Git and Github - a 90 Minute interactive workshop

TWITTER BOOTSTRAP PROJECT

Bootstrap: the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.

https://github.com/twbs/bootstrap

Page 105: Git and Github - a 90 Minute interactive workshop

HOW DOES @MIRE USE GIT

Page 106: Git and Github - a 90 Minute interactive workshop

Under The Hood

Page 107: Git and Github - a 90 Minute interactive workshop

http://www.slideshare.net/svenpeters/getting-git-right

Slide 29+

Page 108: Git and Github - a 90 Minute interactive workshop

Want more?

Page 110: Git and Github - a 90 Minute interactive workshop

www.atmire.com

Questions ?