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.
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.
-
Create an account on GitHub if you do not have one.
-
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.
-
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
You will want to make sure you keep your fork synced with the original repository by tracking the original "upstream" repository that you forked.
- 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
- Fetch the upstream repository's latest commits and branches:
git fetch upstream
- Checkout the master branch and merge in the changes from the upstream repository's master branch:
git checkout master
git merge upstream/master
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.
- Checkout the master branch as the starting point for the development branch:
git checkout master
- 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.
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.
-
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.
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.