This document provides guidelines on how to contribute to the Zapher project using Git. Following these steps ensures a smooth and consistent workflow for all contributors.
Before you begin, ensure you have Git installed on your machine. If not, you can download it from git-scm.com.
- Go to the Zapher repository.
- Click on the "Fork" button in the upper right corner of the page. This creates a copy of the repository in your GitHub account.
Clone the forked repository to your local machine:
git clone https://github.com/yourusername/zapher.git
Navigate into the project directory:
cd zapher
Add the original repository as an upstream remote to keep your fork updated:
git remote add upstream https://github.com/originalowner/zapher.git
Verify the new remote named upstream
:
git remote -v
Create a new branch for your feature or bugfix:
git checkout -b my-feature-branch
Make your changes to the codebase. Ensure you follow the project's coding standards and guidelines.
Stage your changes:
git add .
Commit your changes with a meaningful commit message:
git commit -m "Add feature X to improve Y"
Push your changes to your forked repository:
git push origin my-feature-branch
- Go to your forked repository on GitHub.
- Click on the "Compare & pull request" button next to your branch.
- Provide a descriptive title and detailed description of your changes.
- Submit the pull request.
To keep your fork updated with the latest changes from the original repository, follow these steps:
Fetch the upstream repository:
git fetch upstream
Merge the changes into your local main branch:
git checkout main
git merge upstream/main
Push the updated main branch to your fork:
git push origin main
If you're new to Git or need a refresher, here are some useful resources:
Following this Git workflow will help maintain a clean and organized codebase, making it easier for everyone to contribute. If you have any questions or run into issues, feel free to open an issue on the repository or ask for help in our community channels.