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

    1. The very first thing one should do is to fork the main repository. This assumes you have a github user account.
      1. git clone https://github.com/user/ole.git [Note this is the url of your forked repository]
      2. 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;
        1. List all the branches by using git branch -a
        2. One of the listed entries should have an astreix (star) next to it indicating that is the current active branch on your local machine. By default it is master branch.
        3. 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.
      3. Making changes to your local copy of OLE
        1. 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);
          1. commit: git commit -m "custom message" 
          2. push: git push origin develop
    2. Creating a Pull Request
      1. 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). 
        1. 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. 
        2. Once the Pull Request is created, the core team is notified of your intentions, and someone will review and merge as appropriate.
    3. Core Committers/Reviewers
      1. Review/Merge/Fetch changes by someone else
        1. Fetch changes locally first
          1. 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
            1. Switch to your forked workspace
            2. git fetch "url of the team/contributor's public OLE url" branch name (develop in our case)
              1. Example: git fetch https://github.com/peris/ole.git develop
          2. Switch to the appropriate branch (develop in our case)
            1. git checkout develop (or any other active branch that you would want the merge into)
            2. git merge FETCH_HEAD
          3. Push: Once you have merged the changes, verified, you can commit and push to your public repository. And follow 1b.
    4. Keeping your public repository in sync with the main line.
      1. When you are working on your forked copy of OLE, you would want to keep it in sync with the main develop branch
      2. First you will need to add the remote/develop by using git remote add upstream https://github.com/openlibraryenvironment/ole.git
      3. 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)
      4. Once the local repository is in sync, you can continue working on your changes and push them to your public repository when appropriate. 
      5. Follow 2.b if needed.

 

 

 

 

Operated as a Community Resource by the Open Library Foundation