-
Notifications
You must be signed in to change notification settings - Fork 1
Contribution Guide for new BRIS Developers
To all the new B-RIS members, welcome! Here is a simple guide on how to get on the path to making your first contribution.
There are two different ways to clone the repository, via terminal or Github Desktop
To run in a terminal:
git clone https://github.com/JMozes16/B-RIS
cd B-RIS
For cloning the repository with GitHub desktop, feel free to follow along with the pictures that follow the written instructions.
Either download or open GitHub desktop. Once downloaded and logged into your GitHub account, head to the top bar, click file, and then click "Clone Repository"
When in the clone repository setting, there are three options, Github.com, GitHub Enterprise, and URL. Click on URL, enter: https://github.com/JMozes16/B-RIS for the Repository URL / GitHub username and repository, and choose a local path best suited for you. (I recommend putting it in your GitHub folder in your Documents)
Now that we have the repository cloned, it is time to start developing! Since we don't have the issues created yet, it is up to you as the developer what you plan on contributing towards. When you want to start contributing, it is best to create a branch so that all of the changes are not happening on the master branch.
It is important to name the branches around what you are working on! For instance: Identity_Test_Suite or Adding_Buttons
Below are two ways to create a branch: Terminal and GitHub Desktop
To create a new branch in a terminal:
git checkout -b <new-branch-name>
Using checkout will also allow you to automatically switch to the new branch that was created, so you don't have to switch to the branch yourself.
Lastly, you need to publish the branch, and you can do so by entering this into your terminal:
git push -u origin <new-branch-name>
For creating a new branch with GitHub desktop, feel free to follow along with the pictures that follow the written instructions.
Now that GitHub Desktop is downloaded and the repository is cloned, the current branch that your desktop should be set on is master. Click on current branch and a dropdown menu with other branches, recent branches that you were working on, and the current branch.
Click on the white button that says new branch. Enter the name of the branch.
Once that is finished, the last step is to publish the branch. A blue box will pop up once the branch is committed, from there all that is needed is to hit the darker blue button that "Publish Branch". Once that is published, you can begin coding!
Whenever you are finished testing your code to make sure it runs safely and passes all tests (Testing instructions here) you can commit your changes locally and push them to the origin. As always, there are two different ways to commit and push: Terminal and GitHub Desktop
The following code is how to commit and push to origin in the terminal:
git add .
git commit -m 'title of the changes you made'
git push -u origin <branch-name>
The first line allows you to add all of the changed files to the branch. The second line commits the changes to the branch. The third line pushes the branch to the origin.
GitHub Desktop does a great job of keeping track of the files that you have edited and contributed to. When you want to commit your changes to the branch, on the left hand side of the screen you will see the files you have made changes to and at the bottom a blue button titled "Commit to 'branch_name". Add a description or title and press commit!
Once the commit goes through, push to the origin so other developers can see your work!
When all of your contributions were committed and pushed to the branch that you were working on, it is time to make a pull request! Making a pull request will allow for your code to be reviewed by the creators of BRIS, and be added to the master branch. Pull requests will not always be merged, there may be few changes that need to be made, but do not get discouraged, in due time your contributions will be shown in the main GitHub. Creating a pull request can only happen either through GitHub Desktop or through the GitHub itself.
Click here to go to the repository on GitHub. Looking at the header, click on the button that says "Pull requests"
Once you are at this part of the site, hit the green button that says "new pull request"
Now, you must specific which branch that you want to compare to the master branch and later merge. GitHub shows the most recent branches that were committed and pushed so you can choose which branch you contributed to and want to create the pull request for.
Once you choose the branch, GitHub will show you a confirmation page of all the changes that were made to that branch. Hit "create pull request".
The final step is to add a description of what you changes you made so whoever is reviewing your work has a better understanding! Press submit when you are finished!
With GitHub Desktop, the amount of steps drastically decreases. Once your branch is committed and pushed, a blue button will pop up that says "Create Pull Request".
From there, it will take you to the same page where you add a description of your changes as if you went through the site. Press submit when you are finished!
This is the end of the contribution guide! Every basic thing needed from learning how to clone the repo to creating a pull request is all here. Some other helpful links to stuff you may need are testing instructions and a soon to be created style guide.