Skip to content

Commit c1a2d33

Browse files
committed
added the required features
1 parent 3e0f61d commit c1a2d33

1 file changed

Lines changed: 131 additions & 0 deletions

File tree

README.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,137 @@ Source projects.
77

88
This resource was created as part of the [NumFOCUS DISC Unconference](https://pydata.org/nyc2017/diversity-inclusion/disc-unconference-2017/). 📃 Read about its creation on the [NumFOCUS blog](https://numfocus.org/blog/getting-started-open-source-notes-numfocus-disc-unconference).
99

10+
### Installing Git
11+
12+
Git is essential for contributing to Open Source projects. Follow these steps to get started:
13+
14+
1. **Download Git** from the official website: [https://git-scm.com/install/](https://git-scm.com/install/)
15+
2. **Run the installer** and follow the setup instructions for your operating system (Windows, macOS, or Linux)
16+
3. **Verify the installation** by opening a terminal and running:
17+
```
18+
git --version
19+
```
20+
4. **Configure your identity** (required for commits):
21+
```
22+
git config --global user.name "Your Name"
23+
git config --global user.email "your.email@example.com"
24+
```
25+
26+
### How to Fork and Clone a Repository
27+
28+
**Forking** creates your own copy of a repository on GitHub, and **cloning** downloads it to your local machine.
29+
30+
#### Step 1: Fork the Repository
31+
1. Go to the GitHub repository you want to contribute to
32+
2. Click the **Fork** button in the top-right corner of the page
33+
3. Select your account as the destination for the fork
34+
4. Wait for GitHub to create your copy of the repository
35+
36+
#### Step 2: Clone Your Fork
37+
1. On your forked repository page, click the green **Code** button
38+
2. Copy the URL (HTTPS or SSH)
39+
3. Open a terminal and run:
40+
```
41+
git clone https://github.com/YOUR-USERNAME/REPOSITORY-NAME.git
42+
```
43+
4. Navigate into the cloned directory:
44+
```
45+
cd REPOSITORY-NAME
46+
```
47+
48+
#### Step 3: Set Up the Upstream Remote
49+
Link your local clone to the original repository to stay updated:
50+
```
51+
git remote add upstream https://github.com/ORIGINAL-OWNER/REPOSITORY-NAME.git
52+
```
53+
54+
Verify your remotes:
55+
```
56+
git remote -v
57+
```
58+
You should see `origin` (your fork) and `upstream` (the original repo).
59+
60+
#### Step 4: Keep Your Fork Updated
61+
Before making changes, sync with the original repository:
62+
```
63+
git fetch upstream
64+
git checkout main
65+
git merge upstream/main
66+
```
67+
68+
Now you're ready to create a branch, make changes, and submit a pull request!
69+
70+
### Making Your First Pull Request
71+
72+
Here's a complete workflow example for contributing to an Open Source project:
73+
74+
#### Step 1: Create a New Branch
75+
Always create a new branch for your changes (never work directly on `main`):
76+
```
77+
git checkout -b fix-typo-in-readme
78+
```
79+
Use a descriptive branch name that reflects your changes.
80+
81+
#### Step 2: Make Your Changes
82+
Edit the files you want to change using your preferred code editor. For example, fix a typo, add documentation, or implement a feature.
83+
84+
#### Step 3: Stage Your Changes
85+
Add the files you've modified to the staging area:
86+
```
87+
git add filename.md
88+
```
89+
Or stage all changes:
90+
```
91+
git add .
92+
```
93+
94+
#### Step 4: Commit Your Changes
95+
Write a clear, descriptive commit message:
96+
```
97+
git commit -m "Fix typo in README.md"
98+
```
99+
100+
#### Step 5: Push to Your Fork
101+
Push your branch to your GitHub fork:
102+
```
103+
git push origin fix-typo-in-readme
104+
```
105+
106+
#### Step 6: Create the Pull Request
107+
1. Go to your fork on GitHub
108+
2. You'll see a prompt to **Compare & pull request** – click it
109+
3. Ensure the base repository is the original project and the base branch is `main`
110+
4. Write a clear title and description explaining your changes
111+
5. Reference any related issues (e.g., "Fixes #42")
112+
6. Click **Create pull request**
113+
114+
#### Step 7: Respond to Feedback
115+
- Maintainers may request changes – this is normal!
116+
- Make additional commits to your branch to address feedback
117+
- Push the new commits; they'll automatically appear in the PR
118+
- Be patient and polite in discussions
119+
120+
#### Example Workflow Summary
121+
```
122+
# 1. Sync with upstream
123+
git fetch upstream
124+
git checkout main
125+
git merge upstream/main
126+
127+
# 2. Create a feature branch
128+
git checkout -b add-installation-guide
129+
130+
# 3. Make changes, then stage and commit
131+
git add README.md
132+
git commit -m "Add installation guide to README"
133+
134+
# 4. Push and create PR
135+
git push origin add-installation-guide
136+
# Then go to GitHub and open a Pull Request
137+
```
138+
139+
🎉 **Congratulations!** You've made your first Open Source contribution!
140+
10141
### [Why contribute to Open Source?](./what_is_open_source_and_why_contribute.md)
11142
Wondering why you contribute to Open Source? Here are a few good reasons it can benefit both you and the world!
12143

0 commit comments

Comments
 (0)