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
- Checkout OLE code from github
- Create a local workspace where you would want to checkout the OLE codebase clone the remote repository by issuing the following command:
- 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/
openlibraryenvironment- The very first thing one should do is to fork the main repository. This assumes you have a github user account.
- Once its cloned, you will see a folder with the name "ole" created. Switch to the appropriate branchCheck which branch is active in your local repository by issuing the following command:
- [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
* next - astreix next to it indicating that is the current active branch
currently - on your local
box.- You will need to switch to the "develop" branch. As a best practice, we push our changes to the develop branch.
- Issue the following command to switch to the develop branch: git checkout develop
- Launch your favorite IDE and start OLE (IntelliJ IDEA instructions- coming soon!)
- Ongoing Development
- Fork your copy
- git clone https://github.com/user/ole.git
- Make changes to your local copy
- List all the branches by using git checkout -a
- Switch to develop branch by using git checkout develop. This is to ensure when pull requests are created, they will be against the develop branch in the main repository.
- For more granularity, you can create feature branches and work on those feature branches.
- Create a feature branch by using git branch "feature or issue name"
- Switch to the new feature branch by using git checkout "feature or issue name"
- Push changes to your forked repository
- You can work on changes, commit and push the changes to your own public repository. The command to use would be git commit -m "some message" followed by git push origin develop. Alternatively you could you use your favorite IDE to push your changes to your public repository.
- Create a pull request
- You can visit github.com and go to the ole repository under your username.
- Click on the pull request button to initiate a pull request.
- Once a pull request is created, one of the core committers will review and merge the changes to the main line.
- Fork your copy
- Core Committers
- Review pull requests
- Direct Diff
- Fetch changes locally
- Review
- Merge
- Push
- Review pull requests
- 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.
Info |
---|
Related articles
Filter by label (Content by label) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|