Cloning Repositories
Repositories are like projects (ie FRC-2026)
In order to access them in VS Code, you have to clone it to your computer
Click Clone from GitHub when it pops up in the search bar
You will need to have Git installed
You may need to login to GitHub
Choose the repository you want to work on
Choose a location to store it on your computer
Commiting Changes:
This is how your changes become public and visible to others
Save the changes you made to the code (This saves them on YOUR computer)
The refresh button next to the branch name allows you to refresh any new commited changes to the code from the last time you refreshed it
2. Click the circled icon in the sidebar
3. Click the plus button to stage your saved changes
4. Enter a commit message in the Message box: commit messages are kind of like the update log on this website
"Fixed extra second of wait in popcorn"- Good commit message, I know that the extra second of wait in the popcorn auto was removed
"Jerk"- Alright commit message, I can guess what it is about, but it could be multiple things
"Fix"- Bad commit message, that could be literally anything
"Yay Cheeto Puffs Here I Come"- Terrible commit message, despite being funny, it has literally no relevance to the code
Branches:
Branches help organize the development process
Allows for code to be tested before it is put on the main robot code
Changing Branches
Merging:
Allows you to merge changes from one branch to another
The easiest way to do this is through GitHub, but it can be done through Git
When you select a branch, at the top of the screen, GitHub will say how many commits ahead/behind the branch is
You can click on this to create a pull/push request
If there are any conflicting changes, GitHub will tell you (fix them)
DO NOT PUSH TO MAIN WITHOUT HAVING YOUR CHANGES REVIEWED AND/OR TESTED