Clone this repository
$ git clone https://github.com/Team3256/FRC_Programming_2020.git
Install all necessary tools: Gradle, Third-Party libraries, etc.
$ ./gradlew
Open the project in IntelliJ and make the edits you want!
We are currently using Github Flow, which can be read about here.
- Create and checkout a new branch
git checkout -b <your_branch_name>
, where <your_branch_name> is a descriptive name for your branch. For examplefix-shooter-wheel
,two-ball-auto
, orclimbing
. Use dashes in the branch name, not underscores.
- Make any code changes you need/want to make.
- Try to make your code as readable as possible, remember you're not just writing code for yourself, but everyone else too. A good tool for documenting your code is [JavaDocs]T(https://www.jetbrains.com/help/idea/working-with-code-documentation.html).
- You can use comments to clarify confusing aspects of your code that aren't super readable.
- Commit your work
- Make sure to write meaningful commit messages so that we can easily see what changes have been made.
- Make a Pull Request of your Branch
- Once you finish your code, create a pull request and ask some people to review your code.
- Wait for Others to Review your Code
- It might take some time for others to review your code, so feel free to work on something else in the meantime.
- If you make any changes you can ask reviewers to re-review your code.
- Note: In order to Merge your branch with
master
you need to have at least 2 reviewers approve of your changes.
- Merge your Pull Request
- If there are no conflicts select Squash and Merge, write a good commit message and merge the changes.
- If there are conflicts, change them locally on your branch, push them, and then hit Squash and Merge.
- ???
- Profit
When you review someone else's code, make sure you can understand what they changed and why.
If something does not seem necessary or you don't know what it does, make sure to ask in the pull request.
- On the Files Changed tab of the pull request, navigate to the file you want to comment on.
- Select the blue plus (+) next to the line or hold and drag on the plus to select multiple lines.
- Either Start a review or if you've already started a review, add a comment to your review.
- When done adding comments select either Approve, Comment, or Request Changes to finish your review.
-
Request Changes will block the pull request, until the same reviewer approves of the changes. The best use case for this is something that is critical to the functionality of the program or something that cripples readability.
-
Comment will only add a comment and does not deny or approve the request, these should be used for changes that might not be entirely required but can help add to the code.(eg. formatting)
-
Approve will indicate that you see nothing wrong and the changes should be merged into the main branch.