OLE development using Github
The information below pertains to developers and other coding enthusiasts who would like to set up a running instance of the Open Library Environment project from Github (https://github.com/openlibraryenvironment/ole.get).
Step-by-step guide
- The very first thing one should do is to fork the main repository. This assumes you have a github user account.
- git clone https://github.com/user/ole.git [Note this is the url of your forked repository]
- Switch to the newly created folder (OLE if it exists or to the directory where the OLE base files were cloned to) and do the following;
- List all the branches by using git branch -a
- One of the listed entries should have an astreix  next to it indicating that is the current active branch on your local machine. By default it is master branch.
- Switch to develop branch by using git checkout develop. The OLE core team works on develop branch and so if you need to create any pull requests, its better to be on the same branch as the main ole repository's active development line.
- Making changes to your local copy of OLE
- Once changes have been authored to your local copy of OLE you can commit and push your changes up to your public repository by doing the following; (Alternatively, you could you use your favorite IDE to commit & push changes to your local repository);
- commit: git commit -m "custom message"Â
- push: git push origin develop
- Once changes have been authored to your local copy of OLE you can commit and push your changes up to your public repository by doing the following; (Alternatively, you could you use your favorite IDE to commit & push changes to your local repository);
- Creating a Pull Request
- Once you have pushed your changes to your public repository, you can create a "Pull Request" to notify the core team of your intention to either contribute or get your code merged (other team developers).Â
- On Github, under your repository, switch to develop branch and then you can click the green button "Pull Request", add comments and create the request.Â
- Once the Pull Request is created, the core team is notified of your intentions, and someone will review and merge as appropriate.
- Once you have pushed your changes to your public repository, you can create a "Pull Request" to notify the core team of your intention to either contribute or get your code merged (other team developers).Â
- Core Committers/Reviewers
- Review/Merge/Fetch changes by someone else
- Fetch changes locally first
- Review: In order to fetch someone else's changes, first you need to add the public url of the person's repository whose changes you would like to fetch
- Switch to your forked workspace
- git fetch "url of the team/contributor's public OLE url" branch name (develop in our case)
- Example: git fetch https://github.com/peris/ole.git develop
- Switch to the appropriate branch (develop in our case)
- git checkout develop (or any other active branch that you would want the merge into)
- git merge FETCH_HEAD
- git checkout develop (or any other active branch that you would want the merge into)
- Push: Once you have merged the changes, verified, you can commit and push to your public repository. And follow 1b.
- Review: In order to fetch someone else's changes, first you need to add the public url of the person's repository whose changes you would like to fetch
- Fetch changes locally first
- Review/Merge/Fetch changes by someone else
- Keeping your public repository in sync with the main line.
- When you are working on your forked copy of OLE, you would want to keep it in sync with the main develop branch
- First you will need to add the remote/develop by using git remote add upstream https://github.com/openlibraryenvironment/ole.git
- Sync the changes to your local copy by using git pull upstream develop (develop is the branch that you are syncing your local copy with)
- Once the local repository is in sync, you can continue working on your changes and push them to your public repository when appropriate.Â
- Follow 2.b if needed.
- The very first thing one should do is to fork the main repository. This assumes you have a github user account.
Â
Â
Â
Â
Related articles
Operated as a Community Resource by the Open Library Foundation