+ All Categories
Home > Technology > Using Github for DSpace development

Using Github for DSpace development

Date post: 11-May-2015
Category:
Upload: bram-luyten
View: 782 times
Download: 1 times
Share this document with a friend
Description:
In May 2012, DSpace migrated from the centralized source code management system SVN to Github. While many participants in the community still regard this migration as a technical “under the hood” evolution, it comes with important benefits for repository managers and developers. This workshop presentation features: • General, non-DSpace related Github basics • How DSpace repository managers and committers use github • A few must know details about the underlying Git protocol The bulk of the workshop will be spent in guiding the participants with hands-on parts: • Creating a Github account • Forking their own DSpace repository • Installing Git on their local laptops • Using the Github Windows or Mac client for moving changes from their local machine back to Github Participant Profile This workshop is suited for both repository managers and developers. No prior programming or version control management is required. As a consequences, this workshop will not bring anything new to seasoned developers if they are already experienced working with Git and Github. Format The ideal format would be a one hour session with around 20-50 attendees in a room where they can work on their own laptops. However, the content can be tuned to fit any format.
Popular Tags:
32
www.atmire.com Introduction to Github Modern source code management for DSpace Ivan Masár Bram Luyten
Transcript
Page 1: Using Github for DSpace development

www.atmire.com

Introduction to GithubModern source code management for DSpace

Ivan MasárBram Luyten

Page 2: Using Github for DSpace development

OUTLINE

What are Git and Github

Using Git and Github locally at your institution

Contributing back to DSpace

Page 3: Using Github for DSpace development

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 4: Using Github for DSpace development

TRADITIONAL SOURCE CODE MANAGEMENT

Page 5: Using Github for DSpace development

GIT

Page 6: Using Github for DSpace development

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 7: Using Github for DSpace development

CREATING AN ACCOUNT ON GITHUB.COM

Signup on Github.com

Page 8: Using Github for DSpace development

FORK THE DSPACE PROJECThttp://github.com/DSpace/DSpace

Page 9: Using Github for DSpace development

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

Page 10: Using Github for DSpace development

EDIT DSPACE.CFGStandard mode

Page 11: Using Github for DSpace development

EDIT DSPACE.CFGZen mode

Page 12: Using Github for DSpace development

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

Page 13: Using Github for DSpace development

INSTALLING GIT ON WINDOWS (1)

Page 14: Using Github for DSpace development

INSTALLING GIT ON WINDOWS (2)

Page 15: Using Github for DSpace development

INSTALLING GIT ON WINDOWS (3)

Page 16: Using Github for DSpace development

INSTALLING GIT ON WINDOWS (4)

Run > bash

Page 17: Using Github for DSpace development
Page 18: Using Github for DSpace development

USING GIT ON WINDOWS

Edit & Paste into Bash interpreter

Page 19: Using Github for DSpace development
Page 20: Using Github for DSpace development
Page 21: Using Github for DSpace development

WORKING WITH REMOTE REPOSITORIES (1)

git remote add upstream git://github.com/DSpace/DSpace.git

upstream is the local name for this remote repository

the url is now associated with the name “upstream”

git fetch upstream

getting up to date list of branches from the remote repository.

git pull upstream master

get the actual changes of the master branch and merge them with your local code.

Goal: keeping your repository up to date

Page 22: Using Github for DSpace development

WORKING WITH A LOCAL BRANCH

git branchlists branches and tells you which branch you’re on

git branch mylocalbugfixcreate a branch from the current branch you’re on

git checkout mylocalbugfixmove to the branch you just created

git checkout mastergo back to the master branch

git branch -d mylocalbugfixdeleting the branch you just created. This will give you a warning if the code is still only in your local clone. -D allows you to force delete

git branch -D mylocalbugfix

Page 23: Using Github for DSpace development

COMMITTING TO YOUR LOCAL BRANCH

git commit -aThis will commit all current changes and open up your editor to provide a commit message.

-a will commit all current changesAn alternative is that you explicitly specify which files need to be committed.

git add path/to/file

Page 24: Using Github for DSpace development

MORE ON THE COMMAND LINE GIT

http://bit.ly/learning-git

Page 25: Using Github for DSpace development

DSPACE CONTRIBUTION WORKFLOW

Lowering your own maintenance costs

Prestige and achievement

Giving & receiving community support

Learn from others

Fun

Page 26: Using Github for DSpace development

BUG TRACKING AND FEATURE REQUESTS

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

Page 27: Using Github for DSpace development

CREATING A NEW JIRA ISSUE

Page 28: Using Github for DSpace development

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 29: Using Github for DSpace development

FINAL STEP: FIRING YOUR PULL REQUEST

Done! Your code can now beevaluated for inclusion

Page 30: Using Github for DSpace development

AFTER FIRING THE PULL REQUEST

Generally, your 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 31: Using Github for DSpace development

www.atmire.com

We look forward to your contributions!

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

http://github.com/DSpace/DSpace

https://wiki.duraspace.org/display/DSPACE/Development+with+Git


Recommended