Git and Github - a 90 Minute interactive workshop

111
www.atmire.com + Bram Luyten Ignace Deroost

Transcript of Git and Github - a 90 Minute interactive workshop

www.atmire.com

+

Bram LuytenIgnace Deroost

OUTLINE

Version control and Git

Interactive walkthrough

Ten killer features

Companies

Open Source projects

Under the hood

But first...

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)

Publications

PUBLICATIONS

Originally on paper

Now largely digital

Content provided by academics

Reviews provided by academics

THE PUBLISHING INDUSTRY

THE PUBLISHING INDUSTRY

Originally charged for shipping paper copies

Now charges for digital access

Private enterprise

OUR TAX MONEY

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?

http://www.dspace.org

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.

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

DRYADhttp://datadryad.org/

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

WORKING FOR @MIRE

Join our team of in Belgium or USA

Developer and Project Manager vacancies

Free snacks

First month on the job

Spot the founders

Bubble friday

Funtivities

Version control

Attribution

When and Why

Examples

Who

When

Why

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

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

CENTRALIZED SOURCE CODE MANAGEMENT

GIT: DECENTRALIZED VERSION CONTROL

WHAT YOU NEED TO KNOW FOR NOW

Everything is local

Fast

Compact

Clever mechanisms to “merge” changes together

A social webapp for managing Git repositories

https://github.com/fat

https://github.com/twitter

USING GIT AND GITHUB

Creating an account on Github

Contributing through the Github Web UI

Installing Git on your laptop

Using Git on Windows

CREATING AN ACCOUNT ON GITHUB.COM

Signup on Github.com

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

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

Ignace - update screenshot

EDIT README.MDStandard mode

EDIT README.MDFull screen mode

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

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

SOMETHING A LITTLE MORE ADVANCED

http://bit.ly/learning-git

Ten Killer Features

1. .patch and .diff anywhere

2. Press t for file finder

3. Press ? for shortcuts

4. Blame view

5. Line based comments

6. Project Stats

7. Git.io web publishing

8. Git based deployment

9. .gitignore

10. Cherry-Pick !

Companies

TL;DR

Firm belief in simple tools

Developer freedom

Working asynchronously

Get rid of useless meetings

GOOGLE

PAYPAL

ICELANDIC LAWS

Branching Model

Open Source

OPEN SOURCE CONTRIBUTION WORKFLOW

Lowering your own maintenance costs

Prestige and achievement

Giving & receiving community support

Learn from others

Fun

BUG TRACKING AND FEATURE REQUESTS

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

CREATING A NEW JIRA ISSUE

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

FINAL STEP: FIRING YOUR PULL REQUEST

Done! Your code can now beevaluated for inclusion

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

Google Code ✝25/01/2016

Bitbucket

Sourceforge

GitHub

OPEN SOURCE VERSION CONTROL PLATFORMS

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

BITBUCKET

SOURCEFORGE

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

HOW DOES @MIRE USE GIT

Under The Hood

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

Slide 29+

Want more?

www.atmire.com

Questions ?