Skip to content

Git Workflow

Matt Anderson edited this page Sep 9, 2015 · 2 revisions

MS&T Robotics Git Workflow

In order to create a consistent and effective team please follow this guide when working with this repository.

1. Fork the Repository

Please begin by forking the repository you wish to work on. This can be done on GitHub by clicking the fork button located in the top right of the repository page. Forking creates a copy of the repository that will be linked to your GitHub account which will allow you to make changes and experiment without effecting the main repository. Any changes you make in your forked repository will not be visible in the main repository until you submit a pull request.

To work on your personal fork you should clone it to your workstation. For the IGVC repository this can be done using a git terminal and the command: git clone https://github.com/YOUR-USERNAME/IGVC.git

In order to sync your local fork with the master repository you should add a remote called upstream. In terminal navigate to the local copy of your repository and enter the command (example for IGVC repository): git remote add upstream https://github.com/MST-Robotics/IGVC.git You should now be able to sync your fork using the guide found here.

2. Creating an Issue

Before beginning any work that you would like to integrate in the main repository you should create an Issue on the main repository. This can be done on GitHub by navigating to the repository page and clicking issues which appears on the right side of the page. An issue is a way for us to keep track of what still needs to be done in each repository and will make pull requests and tracking easier as we move forward. The issues should be small tasks that will take no more than a week or two to complete. If it is larger than that it should be broken up.

Please use the following format to create an issue:

Title: Short Description of Work to be Done

Inputs:
Outputs:

Package:
Node:

Detailed description of work to be done.

The Package and Node fields can be left out if the code being worked on is not ROS code.

Please be sure that the issue adequately describes the work that needs to be done to someone who may not be familiar with where the project currently stands. This will give us a place to check on what still needs to be done in the repository. Please feel free to mark issues with the appropriate tags.

Once the issue is created it can be assigned to someone who will attempt to merge it in about a weeks time.

3. Work on Issue

Once the issue is assigned please work on it on your personal fork (make sure you sync with the repository) and feel free to experiment. Make sure you test your code thoroughly before submitting it for the next stage of the process. Feel free to commit and push to your personal fork as this will not effect the master repository.

4. Submit Pull Request

Once you have completed work on an issue it is time to submit a pull request. On your GitHub fork click Pull Request on the right side of the page and then click create pull request. This will allow you to choose what changes you would like to be included in the pull request which is what will eventually be merged in to the master repository. Be sure to mention the issue you are working on in the pull request so that it is clear what the request is meant to accomplish.

5. Code Review

After you have submitted a pull request it will go through a quick review process to ensure that it runs correctly and also that it conforms to our standards. Any problems will be marked and will need to be fixed before the code can be merged.

6. Merge

Once your code passes the code review stage it will be merged in to the repository.