Skip to content

Contributor's Workflow

Torbjörn Klatt edited this page Jan 20, 2016 · 16 revisions

This assumes, you have read and followed Basic Setup.

Update Your Local Copy

Before you start editing, you should, by all means, update your local copy to contain all changes to the website added since you worked on your local copy the last time.

We assume, your are in the working directory of your local copy of the JLESC website (e.g. in $HOME/projects/jlesc.github.io)

  1. Checkout the source branch:

     git checkout source
    

    In case this command fails, you have unstashed changes laying around, which you should either stash (git stash) or drop completely (git reset --hard, be careful with this command!).

    If you do not see folders like e.g. _assets, _projects, etc. (with a preceding underscore) you are probably in the master branch!

  2. Get all upstream changes:

     git fetch --all --prune
     git pull
    

    This fetches all changesets from the main/upstream JLESC website repository to your local copy and updates your checked out source branch to the latest upstream state.

Starting Contributions

Here we describe the recommended workflow of adding your changes to your copy/fork and getting them into the upstream repository and finaly onto the official website.

We strongly encourage everybody to follow this workflow closely!

From now on, it is assumed you are in your local copy (e.g. in $HOME/projects/jlesc.github.io) and it is up to date according to the procedure above.

  1. Create a feature branch to contain your changes.
    Chose a descriptive but short name, e.g. feature/my-latest-paper, feature/project-awesome or fix/bibtex-typos:

     git checkout -b feature/my-latest-paper
    
  2. Add new content, fix existing or add missing

    1. Read Adding Pages.
      If you are not familiar with markdown, just look at existing entries: It is easy.

    2. Read Adding Publications.
      Adding a new or missing publication to the list is easy as adding a BibTeX entry to the BibTeX file.

  3. Add your changes to Git and commit them as you go:

     git add -A
     git commit --signoff
    

    A text editor (defaults to $EDITOR) will open querying you to enter a short but descriptive commit message.

  4. (optional)
    Read Testing Locally to see how you can view and test the website including your changes locally on your computer.

  5. When you are done, push your branch with your changes to your fork on GitHub:

     git push -u myone feature/my-latest-paper
    
  6. Go to the official JLESC website repository while being logged into GitHub.
    A notification should be displayed offering you to open a pull request (PR) from the branch you just pushed onto the source branch.

    In case no such notification pops up, you can create a pull request manually:

    1. Go to your fork on GitHub.

    2. Select your newly pushed branch.

    3. Click 'New pull request'

    4. Review the changes and formulate a descriptive pull request subject and message.
      GitHub will prefill it with a commit message.

    5. Open the Pull Request by clicking on 'Create pull request'.

  7. Wait for one of the admins to merge your PR and see your content online.

    Meanwhile, Travis will try to build the website containing your changes to ensure your changes did not break anything important.

    Please, respond and follow any comments and remarks the admins do on your pull request.

  8. Thank you very much for your contribution! 👍