Skip to content

Workflow

taotianran edited this page Nov 29, 2022 · 22 revisions
English | 简体中文

The detailed workflow for contributing code is described below.

👣 Step 1: Sign into GitHub

First, sign into your GitHub account. If you don't have an account yet, just create one.


👣 Step 2: Fork the repository

Go to the FlyCV repository, fork it by clicking the Fork button in the upper right corner.

Then a forked repository will appear on your profile page.


👣 Step 3: Clone the fork

Use the git clone command to copy the forked repository to the local.


👣 Step 4: Checkout a new branch & contribute code

For daily works like adding a new feature or fixing a bug, please open your feature branch before coding:

git checkout -b my-work

We use the pre-commit to check the code style. Before your first commit, please install pre-commit by running the following commands:

pip install pre-commit
cd FlyCV
pre-commit install

👣 Step 5: Set the upstream repository for synchronizing

For easy synchronization of the original repository, use the following command to add the upstream repository.

cd FlyCV && git remote add upstream https://github.com/PaddlePaddle/FlyCV.git

Before coding, it's a good practice to first synchronize your local repository with the project repository. Use git pull upstream develop to pull any changes from the develop branch of the upstream into your local repository.


👣 Step 6: Create pull request

Push your changes to your fork repository by using git push origin <branch name>.

Return to your fork on GitHub, You can see a highlighted area that displays your recently pushed branch:

Click the Compare & pull request button to create pull request, and then just waiting for the review.