O'Leary - Using GitHub for Enterprise and Open Source Documentation
Using Github for DSpace development
-
Upload
bram-luyten -
Category
Technology
-
view
782 -
download
1
description
Transcript of Using Github for DSpace development
![Page 1: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/1.jpg)
www.atmire.com
Introduction to GithubModern source code management for DSpace
Ivan MasárBram Luyten
![Page 2: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/4.jpg)
TRADITIONAL SOURCE CODE MANAGEMENT
![Page 5: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/5.jpg)
GIT
![Page 6: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/7.jpg)
CREATING AN ACCOUNT ON GITHUB.COM
Signup on Github.com
![Page 8: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/8.jpg)
FORK THE DSPACE PROJECThttp://github.com/DSpace/DSpace
![Page 9: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/9.jpg)
MODIFYING THE CODE IN YOUR OWN FORKCreate a new branch. Do NOT work on master
![Page 10: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/10.jpg)
EDIT DSPACE.CFGStandard mode
![Page 11: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/11.jpg)
EDIT DSPACE.CFGZen mode
![Page 12: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/12.jpg)
PREVIEW: OVERVIEW OF CHANGESRed line: deleted - Green line: added
![Page 13: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/13.jpg)
INSTALLING GIT ON WINDOWS (1)
![Page 14: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/14.jpg)
INSTALLING GIT ON WINDOWS (2)
![Page 15: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/15.jpg)
INSTALLING GIT ON WINDOWS (3)
![Page 16: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/16.jpg)
INSTALLING GIT ON WINDOWS (4)
Run > bash
![Page 17: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/17.jpg)
![Page 18: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/18.jpg)
USING GIT ON WINDOWS
Edit & Paste into Bash interpreter
![Page 19: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/19.jpg)
![Page 20: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/20.jpg)
![Page 21: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/21.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/22.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/23.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/24.jpg)
MORE ON THE COMMAND LINE GIT
http://bit.ly/learning-git
![Page 25: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/25.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/26.jpg)
BUG TRACKING AND FEATURE REQUESTS
http://jira.duraspace.org/browse/DS
![Page 27: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/27.jpg)
CREATING A NEW JIRA ISSUE
![Page 28: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/28.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/29.jpg)
FINAL STEP: FIRING YOUR PULL REQUEST
Done! Your code can now beevaluated for inclusion
![Page 30: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/30.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/31.jpg)
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
![Page 32: Using Github for DSpace development](https://reader034.fdocuments.us/reader034/viewer/2022052321/554fb97cb4c9053d018b4660/html5/thumbnails/32.jpg)
CREDITS
http://earaya.github.io/glearn/#/2/6
http://git.or.cz/course/svn.html
http://pcottle.github.io/learnGitBranching/