-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Learningcomputers777/add_contributing.md
Add contributing.md
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
### Contribution | ||
Certainly! Here's a step-by-step guide on how to contribute to a GitHub repository using Git: | ||
|
||
### 1. **Fork the Repository:** | ||
- Go to the GitHub page of the repository you want to contribute to. | ||
- Click on the "Fork" button in the upper right corner. This creates a personal copy of the repository on your GitHub account. | ||
|
||
### 2. **Clone Your Fork:** | ||
- On your forked repository, click the "Code" button and copy the URL. | ||
- Open your terminal or command prompt. | ||
- Use `git clone` followed by the URL to clone the repository to your local machine: | ||
``` | ||
git clone https://github.com/your-username/repository.git | ||
``` | ||
|
||
### 3. **Create a New Branch:** | ||
- Change into the repository directory: | ||
``` | ||
cd repository | ||
``` | ||
- Create a new branch for your contribution: | ||
``` | ||
git checkout -b feature/new-feature | ||
``` | ||
|
||
### 4. **Make Changes:** | ||
- Make the necessary changes in the code using your preferred code editor. | ||
|
||
### 5. **Stage and Commit Changes:** | ||
- Stage your changes: | ||
``` | ||
git add . | ||
``` | ||
- Commit your changes with a descriptive message: | ||
``` | ||
git commit -m "Add new feature" | ||
``` | ||
|
||
### 6. **Push Changes to Your Fork:** | ||
- Push your changes to your forked repository on GitHub: | ||
``` | ||
git push origin feature/new-feature | ||
``` | ||
|
||
### 7. **Create a Pull Request (PR):** | ||
- Visit your forked repository on GitHub. | ||
- Click on the "New Pull Request" button next to the branch you just pushed. | ||
- Write a clear title and description for your pull request, explaining the changes you made. | ||
- Click on the "Create Pull Request" button to submit your contribution. | ||
|
||
### 8. **Respond to Feedback:** | ||
- Be responsive to any feedback or suggestions given by the maintainers. You might need to make additional changes based on the feedback. | ||
|
||
### 9. **Merge Changes:** | ||
- Once your pull request is approved, it will be merged into the main repository by the project maintainer(s). | ||
|
||
### 10. **Syncing with Upstream (Optional):** | ||
- If the original repository you forked from has new changes and you want to update your fork: | ||
``` | ||
git remote add upstream https://github.com/original-repository/repository.git | ||
git fetch upstream | ||
git checkout main | ||
git merge upstream/main | ||
git push origin main | ||
``` | ||
|