🙌🎊 First off, thanks for taking your time to contribute to Reach! 🎊🙌
The following is a set of guidelines for contributing to Reach on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
What do I need to do before contributing?
This project and everyone participating in it is governed by the Reach Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
For simplicity, GitHub Desktop will be used for interacting with Github and the Reach repository.
Steps:
- Visit the link above and install GitHub Desktop .
- Launch GitHub Desktop.
- Browse to File > options > Accounts and log into your GitHub account.
- Congratulations! You now have GitHub Desktop setup.
The next prerequisite is to clone the Reach repository to your local machine.
Steps:
- In GitHub Desktop browse to File > Clone repository > GitHub.com and select the "ReachCP317/Reach" repository.
- Choose a Local path to clone the repository to and click "Clone".
- Congratulations! The repository should now be accessible on your computer.
It is crucial to the neatness and efficiency of the Reach repository that the following instructions are followed to a T.
When adding to the repository, a new branch off of the develop
branch should be created. Branching is the way to work on different versions of a repository at one time.
When you create a branch off the develop
branch, you’re making a copy, or snapshot, of develop
as it was at that point in time. If someone else made changes to the develop
branch while you were working on your branch, you could pull in those updates.
When creating a branch, consider what it is you plan on implementing or fixing and name the branch accordingly. Examples: if you are adding a feature that zooms, a good branch name would be "zoom-feature", if you are fixing a bug that crashes the application, a good branch name would be "crash-bug-fix".
Steps:
- In GitHub Desktop select Reach as the current repository.
- Make sure you have
develop
selected as the Current branch. - Browse to Branch > New Branch.
- Name your new branch as described above.
- Select
develop
and click "Create branch". - In the top right click "Publish branch".
- Congratulations! You now have a branch you can make changes to!
Now that you have a local version of the repository you can make changes to it as needed. Once you have made these changes you need to save them to the repository. On GitHub, saving changes is called Commiting. Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes, so other contributors can understand what you’ve done and why. Use the Git Commit Styleguide for styling your commits.
Steps:
- After making changes open GitHub Desktop.
- You should see files appear under the changes tab.
- Make sure you have the branch you created selected.
- Add a Summary and an optional Description.
- Click "Commit to (branch_name_here)".
- In the top right click "Push origin".
- Congratulations! Your changes have been pushed to your branch in the repository.
Nice edits! Now that you have changes in a branch off of develop
, you can open a pull request.
Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red.
As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished. Read the PULL_REQUEST_TEMPLATE.md for styling your Pull Requests.
Steps:
- In GitHub Desktop browse to Branch > Create pull request.
- This will open your browser with a pull request.
- Make sure You compare your branch with
develop
. - Add a Title and Description.
- Click "Create pull request".
- Congratulations! You created a pull request.
In this final step, it’s time to bring your changes together – merging your branch into the develop
branch.
After your code has been reviewed by at least two other members it can then be merged to develop
.
Steps:
- Under your pull request click "Merge".
- Congratulations! You've successfully merged your branch into
develop
. - It is now safe to delete your branch, click "Delete".
This concludes the guide on contributing.
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Consider starting the commit message with an applicable emoji:
- 🎨
:art:
when improving the format/structure of the code - 🐎
:racehorse:
when improving performance - 📝
:memo:
when writing docs - 📲
:calling:
when fixing something on Android - 💻
:computer:
when fixing something on Web - 🐛
:bug:
when fixing a bug - 💧
:droplet:
when adding code or files - 🔥
:fire:
when removing code or files - ✅
:white_check_mark:
when adding tests - 🔒
:lock:
when dealing with security
- 🎨