Welcome to our project! We're excited that you're considering contributing to open-source development. This guide will walk you through the essential Git commands and best practices to make your contribution easy and successful.
Before you start contributing, you need to fork the repository. Forking creates a copy of the repository under your own GitHub account.
Steps:
After forking the repository, you need to clone it to your local machine so you can work on it.
git clone https://github.com/your-username/repository-name.gitAfter cloning the repository, create a new branch to work on your changes. Always work in a separate branch to avoid conflicts with the main branch:
git checkout -b feature/your-branch-nameNow that you're in your branch, make the necessary changes to the code, documentation, or other parts of the project. Be sure to test everything before moving on to the next step.
Once your changes are complete, it's time to commit them. Follow these steps:
git add .git commit -m "Your descriptive message here"After committing your changes locally, push the branch to your GitHub repository.
git push origin feature/your-branch-nameThis will upload your branch to your forked repository on GitHub.
With your changes pushed to GitHub, you're ready to submit a pull request (PR) so the maintainers can review your work.
If the original repository is updated while you're working, you might want to sync your fork to keep it up-to-date. Here's how:
git remote add upstream https://github.com/original-owner/repository-name.gitgit fetch upstreamgit checkout main
git merge upstream/maingit push origin main