Commit Code
1. Fork Repository
The core service components include AREX-Agent, AREX-API, AREX-Storage, AREX-Schedule, and AREX-Front. First, determine the repository where you want to commit your code, and then from the remote repository, https://github.com/arextest/<corresponding repository>.git
Fork a copy of the code from the remote repository to your own repository. Here is an example of AREX-Storage repository.
2. Configure git and commit changes
- Clone your repository locally.
git clone https://github.com/<your_github_name>/arex-storage.git
- Add the remote repository address, naming it upstream, for example:
git remote add upstream https://github.com/arextest/arex-storage.git
- Check out the repository:
git remote -v
There will be two repositories: origin (your own repository) and upstream (the remote repository).
- Get/update remote repository code (skip if it's already up-to-date):
git fetch upstream
- Merge remote repository code to local repository:
git checkout origin/main
git merge --no-ff upstream/main
- New branch:
Every time you want to submit a PR, you have to create a new branch for Feature or Bugfix, based on the main branch of the upstream.
git checkout -b xxx origin/main
- After making code changes on the newly created branch, commit it to your own repository:
git commit -m 'commit content'
git push origin xxx --set-upstream
3. Create PR
Once the code is committed, open Github's Pull Request page in your browser and click "New pull request".
Select the modified local branch and the destination branch you want to merge, and click "Create pull request" to create a PR.
After the maintainer completes the CodeReview, the commit is merged into the main branch.