- Go to the GitHub repository for this project.
- Click on the "Fork" button in the top-right corner of the page.
- GitHub will create a copy of the repository in your GitHub account. This is your own version of the project where you can freely make changes.
- Click on the "Code" button on your forked repository's page.
- Copy the URL provided (make sure it's the HTTPS one).
- Open your terminal or command prompt.
- Type the following command to clone the repository:
git clone <URL you copied>
- Navigate to the project folder using:
cd <repository-name>
- Before making any changes, create a new branch to keep your changes separate from the main branch.
- Type the following command to create and switch to a new branch:
Replace
git checkout -b your-branch-name
your-branch-name
with a name that describes your changes, e.g.,add-name
.
- Open the project folder in your preferred code editor.
- Find the list of users in the
index.html
file. - **Add your name and GitHub ID to the list:
<li><a href="https://github.com/your-username">Your Name</a></li>
- Save your changes.
- Go back to your terminal.
- Check the status of your changes:
git status
- Add your changes to the staging area:
git add .
- Commit your changes with a meaningful message:
git commit -m "Added (your name) to the list of contributors"
- Push your changes to the branch you created earlier:
git push origin your-branch-name
- Go to your forked repository on GitHub.
- Click on the "Compare & pull request" button that appears after pushing your changes.
- Add a title and description for your pull request. Describe what changes you’ve made.
- Click "Create pull request."
- The project maintainer will review your pull request.
- They may request changes, approve, or merge your pull request.
- If changes are requested, make them on your local branch, commit, and push them to the same branch. The pull request will automatically update.
- Once your pull request is merged, you’ve officially contributed to an open source project!
- Thank you for contributing! Feel free to share your experience and keep contributing to more projects.