Submitting PRs - StanfordVLSI/dragonphy2 GitHub Wiki
Submitting Pull Requests
If you would like to make some contributions to add DragonPHY, thank you! Here's the process to get your contributions added to the repo.
- If you're not already on your own branch, create one with the following command. This will create a new branch and switch to it.
git checkout -b name_of_your_branch
- Check whether there are any missing files in the commit with
git status
- After you finish adding files, review the files that are going to be pushed to make sure that there is no sensitive information:
git diff --stat --cached origin/name_of_your_branch
- Push your branch to GitHub with the following command. In the future, you can push to this branch simply with
git push
git push --set-upstream origin name_of_your_branch
- Go to the branches page and create a pull request for your branch.
- Add a description of the PR and request a review from a team member (select a name on the right-hand side of the page). Our pull request process requires that there is at least one approval.
- We also require that all tests pass in order to merge a PR. Tests take 20-30 min to run and their status is indicated lower down on the PR page. An orange circle means tests are in progress, while a green check or red "x" indicate the test has completed. You can quickly debug failed tests by viewing the corresponding log (click on the red "x"). Viewing logs does require BuildKite access.
- If the error is not immediately obvious, it is usually better to debug tests locally. For that we have a separate instructions page.
- When all the tests are passing, there is still one other potential problem -- the branch may be out of date. This means that there were changes pushed to the
master
branch that are not included in your branch. To resolve this, do the following:
# get the latest version of the master branch
> git fetch
> git checkout master
> git pull origin master
# then switch back to your branch
> git checkout name_of_your_branch
# merge changes from master into your branch
> git merge master
# fix merge conflicts and use "git add" to add back files once the conflicts are fixed
> git commit -m "fix merge conflicts"
> git push origin name_of_your_branch
- At this point, your branch should be up-to-date and ready to merge. The tests will be re-run, however, because it's possible that the merging process broke some tests. In that case, return to the previous steps on debugging tests.
- Note that when you push to your branch, the pull request is automatically updated to reflect the latest changes to your branch.