Skip to content

Development Steps

Monty edited this page Oct 1, 2020 · 1 revision

So, you want to work on this awesome gui! Great! Here's the workflow to help keep everything clean and neat when working with a team and to prevent things from exploding. These are standard software engineering procedures that you'll see (hopefully) everywhere you go. At the end of the day, these practices were implemented to prevent bad code getting productized and other terrible nightmares.

This is just a basic overview of all the steps. There may be some bumps and stuff along the way and feel free to ask the Slack for help! I'll try to keep this updated moving forward. Also, these steps will be using git commands, so if you're using a git GUI or something, the steps will be a bit different, but you won't get to type in the hacker commands.

  1. Clone the gui repo. This means you're making a clone of the repository onto your local workstation. On a cli (command line interface), this is typically done with the following command:

git clone https://github.com/cal-poly-hyperloop-controls/gui.git

  1. Make your own branch. We want to avoid making changes directly on the main code, the master branch. All the code in the master branch should be well tested, integrated, and verified that it works. I like to name the branch based off of what I'm working on, followed by the name (in case multiple people are also working on the same feature). For example, if I'm working on the navbar, I'd call the branch navbar-monty.

Create the new branch:

git branch [your branch name]

And switch to it:

git checkout [your branch name]

You can verify that you're on the correct branch with the following command, and you'll see your current branch with an asterisk in a different color text:

git branch

  1. Now that you're in your own branch, you can destroy stuff and it won't mess up the master branch. Do your magic here. Remember to commit periodically!

  2. Right now, your branch is only on your local machine. If you want to push your branch so other people can see it in the GitHub repo or you're ready to merge, enter this command:

git push

  1. After testing to make sure everything works as intended, it's time to submit a pull request (PR)! A pull request is basically a request to merge one branch (your's) onto another branch (the main branch/master). It's kind of a big deal (but not really). Go over to your branch in the GitHub repository after pushing your changes. You'll see a green box that says something like "Merge and Submit a Pull Request". Click that and fill out the all the info. Be sure to add Monty, Al, and anyone else who worked on the feature as a reviewer. They'll check your changes and your code to make sure everything looks good to be mainlined.

  2. Pray that your PR goes through.

  3. Make any changes if specified by the reviewers.

  4. yay your pr went through!

Clone this wiki locally