Skip to main content

8. GitHub Operation Guide

8.1 Submit code to RUBIK Pi 3

Submit code to RUBIK Pi by submitting a Pull Request (PR). After review, your code may be merged into the RUBIK Pi main branch. The following example shows a method to submit PR to the main branch of RUBIK Pi Linux:

  1. Log in to GitHub and visit the RUBIK Pi 3 repository https://github.com/rubikpi-ai/linux.
  2. Click the Fork button and follow the prompts to fork the repository to your own repository.

  1. Clone the forked repository locally using the git clone command.

tip

Use the URL of your own repository.

git clone https://github.com/hongyang-rp/linux.git
  1. Enter the repository and create a new branch rpdev locally for development.
    cd linux   
git checkout -b rpdev

  1. Modify and commit your code.
    git add .   
git commit -s
  1. Run the git push command to push your local branch to your forked repository on GitHub.
    git push --set-upstream origin rpdev
  1. If the following error occurs when you commit code, a personal token is required.

Method to obtain a personal token:

  1. Click your GitHub avatar and click Settings.

  1. Click Developer settings.

  1. Select Personal access tokens and click Tokens (classic).

a29e3a97-ea5c-4e81-a5b9-2bc21d5a39d4.jpeg

  1. Select Generate new token.

  1. Configure the token: set a name and choose an expiration time.

It is recommended that you check all the boxes and then click Generate token.

  1. The following token is generated. Save the token properly.

  1. Run the git remote set-url command to configure the token.
    git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git
  • Replace <your_token> with the token you obtained.

  • Replace <USERNAME> with the GitHub user name.

  • Replace <REPO> with the repository name.

    Perform the git push operation. The operation succeeds.

  1. Open the browser to visit the repository you forked on GitHub. The following message is prompted. Click Compare & pull request to create a PR as prompted.

    f0a4fea7-6923-4c08-83cf-7a821a1fb1ae.jpeg

Alternatively, click Pull requests and click New pull request to create a PR.

3c15764b-4823-46f7-85d1-d56d42fcf6c4.jpeg

  1. Wait for the administrator to view and reply to the PR, and finally merge the PR into the main branch. Click Closed to view PRs merged into the main branch.

warning

If the following message is prompted on the repository you forked, choose Sync fork > Update branch to update the GitHub repository. After the update succeeds, run the git pull command in the local repository to synchronize the update.

7b6f6555-030d-417e-8a62-4c64ae089f59.jpeg

8.2 Create an issue

If you encounter problems during development, find bugs, have comments about RUBIK Pi 3, or want to add features, you can create an issue.

  1. Log in to GitHub and visit the RUBIK Pi repository, such as https://github.com/rubikpi-ai/linux.
  2. Click Issues in the upper left corner.

  1. Before creating an issue, search the issue in the search box to find if someone has already created a similar one. Click New issue and follow the instructions to create an issue.

69a8b6b4-72a7-4c3f-97f8-08d12db755cd.jpeg

  1. Wait for a reply from the community.