Skip to content

Contributing

Sam Chau edited this page May 9, 2024 · 3 revisions
  1. Fork the repository (optional)

    • If you don't have write access to the repository, click on the "Fork" button on the top right corner of the repository page on GitHub.
    • Clone the forked repository to your local machine using git clone <forked_repo_url>.
    • Move into the cloned directory using cd <repo_name>.

    Note: If you have write access to the repository, you can skip the forking step and directly clone the main repository.

  2. Create a new branch

    • Create a new branch for your changes using git checkout -b <branch_name>.
    • Choose a descriptive branch name that reflects the nature of your changes.
  3. Make your changes

    • Make your desired changes to the wiki page files.
  4. Stage, commit, and push your changes

    • Stage the changes you want to commit using git add <file1> <file2> .... Replace <file1>, <file2>, etc., with the specific files you modified.
    • Commit your changes with a descriptive message using git commit -m "Your commit message here". Provide a clear and concise description of the changes you made.
    • Push your changes to your branch using git push origin <branch_name>.
  5. Create a pull request

    • Go to GitHub and open the repository (either your forked repository or the main repository).
    • Click on "Pull requests" and then click on "New pull request".
    • Choose the branch you created and pushed your changes to as the "head repository" (if you forked) or the "compare branch" (if you have write access).
    • Choose the original repository's branch where you want your changes to be merged as the "base repository" or "base branch".
    • Click on "Create pull request" and provide a descriptive title and description for your changes.
  6. Review and merge

    • The repository maintainers will review your pull request and provide feedback if necessary.
    • Once your changes are approved, the maintainers will merge your pull request into the main repository.

Best Practices

To ensure a smooth contribution process, please follow these best practices:

  • Modular commits: Make smaller, focused commits that address specific changes or additions. This makes it easier to review and understand the changes you've made.

  • Proper branch naming: Use descriptive and meaningful names for your branches. Follow a consistent naming convention, such as feature/<feature-name>, bugfix/<issue-number>, or docs/<change-description>.

  • Writing a good pull request:

    • Provide a clear and concise title that summarizes the changes you've made.
    • Include a detailed description of your changes, explaining the purpose and any relevant information.
    • If your pull request addresses an existing issue, reference the issue number in the description using #<issue-number>.
    • If your changes are visual, consider including screenshots or gifs to showcase the changes.
  • Keeping your branch up to date: Before creating a pull request, make sure your branch is up to date with the latest changes from the main repository. Pull the latest changes and resolve any conflicts that may arise.

Clone this wiki locally