Skip to content

Latest commit

 

History

History
103 lines (66 loc) · 3.77 KB

CONTRIBUTING.md

File metadata and controls

103 lines (66 loc) · 3.77 KB

Contributing to React Native Map Scale Bar

React Native Map Scale Bar is an open source community project, and everyone is welcome to contribute. This short guide will assist you with the workflow required in successfully having your features and bug fixes merged into the project.

Table of Contents

How to Contribute Code

Creating a Fork

The best approach to contribute code to React Native Map Scale Bar is to fork the main repository on GitHub, then submit a pull request.

  1. Create an account on GitHub if you do not have one.

  2. Fork the repository by clicking on the 'Fork' button near the top-right section of the page. This creates a copy of the code under your account on GitHub.

  3. Clone your fork to your local machine:

git clone https://github.com/USERNAME/react-native-map-scale-bar.git

# If you have an SSH key setup with GitHub
git clone [email protected]:USERNAME/react-native-map-scale-bar.git

# Navigate to your cloned fork
cd react-native-map-scale-bar

Keeping Your Fork Up to Date

You will want to make sure you keep your fork synced with the original repository by tracking the original "upstream" repository that you forked.

  1. Add "upstream" to the list of remotes:
# You will only need to do this once
git remote add upstream https://github.com/salindersidhu/react-native-map-scale-bar.git
  1. Fetch the upstream repository's latest commits and branches:
git fetch upstream
  1. Checkout the master branch and merge in the changes from the upstream repository's master branch:
git checkout master
git merge upstream/master

Creating a Development Branch

A new branch is required when working on a new feature or bug fix. This ensures that your changes are kept seperate from the master branch making it easier to manage multiple pull requests for every task you complete.

  1. Checkout the master branch as the starting point for the development branch:
git checkout master
  1. Create a new development branch on your local machine and switch to it:
git checkout -b {prefix}/branch-name origin/master

Prefix is either hotfix, feature or experiment depending on the type of development work.

Submitting a Pull Request

Prior to submitting a pull request, you must ensure that you have rebased your development branch so that merging it into the original repository is a simple fast-forward free of merge conflicts.

  1. Ensure that your fork is up to date.

  2. Rebase your development branch:

git checkout {prefix}/branch-name
git rebase master

Once you have committed and pushed all of your changes on your development branch to GitHub, go to the page for your fork on GitHub, select your development branch and click the pull request button. Once a pull request has been made, you can continue to make changes to the development branch and your pull request will automatically track the changes and update.

How to Submit a Bug Report

If you find a bug in the code, please submit a ticket to the Bug Tracker.

Before submitting your bug report, please ensure that your ticket contains the following:

  • A short summary of the bug, typically a couple of sentences.
  • A screenshot showing the bug.
  • The version of React Native Map Scale Bar you are using.