Skip to content

Instantly share code, notes, and snippets.

@justinanderson
Created February 9, 2022 17:17
Show Gist options
  • Select an option

  • Save justinanderson/0ff53d7eda9e4f4bf66c85683e28894f to your computer and use it in GitHub Desktop.

Select an option

Save justinanderson/0ff53d7eda9e4f4bf66c85683e28894f to your computer and use it in GitHub Desktop.
Contribution Guidelines

Contribution Guidelines

  • Never commit directly to the master branch. Always work on a separate branch and merge into master via pull requests.

  • Try to avoid making merge commits. We use a rebasing workflow for this project's pull requests rather than merging. This includes keeping your local branches up to date with git pull --rebase rather than just git pull. Merge commits have a history of creating hard to diagnose bugs and make reviewing pull requests harder. Sometimes merge commit are unavoidable, but those situations should be rare.

  • Name your branches however you like, but please use meaningful names. Bad names include issue-42, bug-fixes, and justins-branch. Better names include map-layer-refactor, async-loading.

  • The same goes for commit messages. A commit message should describe what a commit does, preferably in the imperative mood. Bad messages look like:

    Fix remaining bugs from PR
    
    Issue 42
    
    More work
    

    Good messages look like:

    Persist the Geocoding API cache across renders.
    
    Tell Babel to skip transpilation of mapbox-gl.
    
    Mapbox GL JS is in a weird state with their 2.x release and doesn't
    play nicely with things that can't support ES6 yet. See
    mapbox/mapbox-gl-js#10565 for a deeper explanation.
    
    Resolves #42.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment