Contributing to open-source projects is a great way to improve your coding skills, collaborate with others, and give back to the community. In this developer online education event, we will also encourage you to participate by submitting Pull Request (PR). Here’s a step-by-step guide.
-
Go to the Arweave-Academy repository on GitHub which is produced by Arweave Oasis.
-
Click the
Fork
button at the top right corner to create your copy of the repository. -
You can find the repository you have forked in your GitHub account.
-
Copy the repository URL from your forked repository.
-
Open your terminal and run:
git clone <repository-url> ## Exmaple: git clone https://github.com/gerrywang1117/Arweave-Academy.git
-
Navigate to the cloned directory:
cd <repository-folder> ## Example: cd Arweave-Academy
-
Verify the remotes:
git remote -v
-
As we can see, the connection has been established. Next, we need to connect to the upstream, which refers to the original project source that was forked initially, in this case, Arweave-Academy.
git remote add upstream <original-repository-url> ## Example: git remote add upstream https://github.com/ArweaveOasis/Arweave-Academy.git
-
At this point, if we enter
git remote -v
, we can see that the local repository is now connected to both the remote repository and the upstream.
Why do we do this? Because while you’re developing, others might also be working on the project. It’s likely that the code you forked is no longer up-to-date. In such cases, you need to continuously update your code, ensuring that you update it at least once before pushing. This ensures that code conflicts are minimized.
git fetch upstream main
-
Edit the code or documentation in your local repository.
-
Thoroughly test your changes to ensure they function as intended.
-
Stage your changes:
git add .
-
Commit your changes with a meaningful message:
git commit -m "Description of changes"
-
Push your changes to your forked repository. This allows you to push all changes to your forked repository.
git push origin main
-
Go to the original repository on GitHub. Click the Pull Requests tab.
-
Click New Pull Request.
-
Click Create Pull Request.
-
Write a clear title and description for your PR, explaining what you’ve changed and why. Then submit the Pull Request.
-
Wait for maintainers to review your PR and merge to the main repository.
-
Once your PR is merged, congratulations! You’ve successfully joined the event.
- Be respectful and patient when communicating with maintainers.
- Follow the project’s coding style and guidelines.
- Make small, focused changes rather than large, complex updates.