Skip to content

Commit 034a2a2

Browse files
committed
fix: cleanup and add social context
1 parent 95e00f9 commit 034a2a2

File tree

4 files changed

+78
-51
lines changed

4 files changed

+78
-51
lines changed

github-git/edit-commit-files.md

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -18,83 +18,97 @@ og:image: /images/github/steps-to-contribute.png
1818
og:image:alt: An image that shows the steps for contributing to open source on GitHub.
1919
---
2020

21-
# Your first edits to a file in your fork
21+
# Your First Edits to a File in Your Fork: Edit & Commit
2222

23-
:::{todo}
24-
Github has changed things a bit. If you edit the file in place, it automatically directs you to a pr workflow in the repo that you are in.
25-
26-
So I think we want to break this down into two things
23+
Now that you've [identified and comment on an issue](identify-issue), [forked the repository](fork-repo) and received approval to work on an issue, it's time to make your changes.
2724

28-
1. The drive-by pull request
25+
> **💡 Reminder:** Your fix should be **small and text-based**, like updating documentation or fixing a typo.
2926
30-
* Click on the edit button in the repo that you want to make changes.
31-
* If you don't have permission, it will automatically ask you about making a branch, which will be from your fork.
27+
:::{admonition} What you'll learn
28+
:class: tip
29+
You’ll edit a file directly in your **fork** using GitHub’s interface and commit the changes using only the native GitHub interface.
3230

33-
2. The pr from your fork. If the fork already exists, then you can still edit the file.
31+
NOTE: If you want to work on the files locally on your laptop, you will need to [clone or make a copy of your repo locally](clone-repo).
3432

3533
:::
3634

37-
In the previous lesson, [you identified something that you wanted to fix in our example GitHub repository](identify-issue). Ideally, the fix that you identified is small, text-based, and can be made by modifying a single file.
35+
## How to edit a file in your fork
3836

39-
After you [forked the repository that you want to contribute to](fork-repo) and received approval from a maintainer to work on the issue, it's time to start making the changes you suggested.
37+
GitHub lets you edit files right in your browser. Here’s how:
4038

41-
:::{admonition} What you'll learn here
42-
:class: tip
43-
In this lesson, you will edit a file in the demo pyOpenSci repository using the GitHub interface in your [forked repo](fork-repo). You will then commit your changes.
44-
:::
45-
46-
Here, you will make the changes that you proposed to work on using only the native GitHub interface.
47-
To do this, you do not need to [clone or make a copy of your repo locally](clone-repo).
39+
1. Navigate to **your fork** of the repository.
40+
2. Find the file you want to edit.
41+
3. Click the <kbd><i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> Edit</kbd> button.
42+
4. Make your changes and **commit** them.
4843

4944
:::{figure} /images/github/edit-commit-file.gif
45+
:alt: "GIF showing how to edit and commit a file on GitHub."
5046

47+
Editing a file directly in the GitHub interface is a straight forward process.
5148
:::
5249

53-
## About editing files on GitHub
54-
55-
Editing a file on GitHub allows you to focus on the contributing workflow without needing to learn or install git, create a local development environment, or use the command line.
56-
57-
Following this process, you can edit as many files as you wish. However, on GitHub, you must edit and commit changes to them individually.
50+
> **⚡ Quick tip:** You can edit as many files as you want, but GitHub only lets you commit them **one at a time** in the browser.
5851
59-
### Editing files on GitHub vs GitHub Codespaces vs Locally
6052

61-
In the above image, you edit the file online at GitHub.com. To do this, you navigate to the page that you want to edit and click on the <kbd><i class="fa-solid fa-pencil"></i></kbd> edit button. This approach is a great way to start contributing as you don't have to
53+
## Editing files directly on GitHub vs. GitHub Codespaces
6254

63-
1. use the command line to edit the file
64-
2. know how to use .git
55+
GitHub now offers **two ways** to edit files directly in the interface or using the cloud based GitHub Codespaces:
6556

66-
However, the one small downside of this approach is that you can only edit and commit one file at a time.
57+
| Option | When to Use | Pros | Limitations |
58+
|---------|------------|------|-------------|
59+
| **GitHub Interface** <i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> | Quick edits (typos, small fixes) | No setup needed, edit in browser | Can only commit one file at a time |
60+
| **GitHub Codespaces** <i class="fa-solid fa-laptop-code" style="color: #81c0aa;"></i> | Editing multiple files | Full VS Code environment in browser | Requires configuration but once configured, you can reuse it |
6761

68-
An alternative way to edit multiple files on GitHub is to use GitHub Codespaces.
62+
> **💡 Need to edit multiple files using a coding editor like VsCode or Jupyter?** Learn more about using [GitHub Codespaces](github-codespaces).
6963
70-
[GitHub codespaces](github-codespaces) provide online GitHub development environments that allow you to edit multiple files and commit them together using an IDE (interactive development environment) such as VsCode.
71-
72-
Sometimes, maintainers will set up a codespace for you to use. Or, you can also set one up yourself in your fork. GitHub codespaces also come with GitHub setup, which means that you can commit files to your fork within VsCODE vs needing to know how to use the command line.
7364

7465
## What is a commit?
7566

76-
Here are 3 points to remember when you think about commits:
67+
You can think of a **commit** as a save (or restore) point in git version control's history. Each commit captures changes that you make to one or more files in the repository at a specific point in time; each commit includes a note explaining what you did.
68+
69+
:::{tip}
70+
A **commit** is a feature of [git version control](what-is-git), the version control system that GitHub runs in the background.
7771

78-
1. A **commit** is a feature of [git version control](what-is-git) that is similar to saving your changes with a note explaining what you did.
72+
:::
7973

80-
2. Each commit that you make represents a set of changes to one or more files in your repository at a specific time.
74+
### How commits work
8175

8276
:::{figure} /images/github/git-commits-files.png
8377
:alt: A visual example demonstrating how Git tracks changes to a document through commits. The image shows an “Original File” with its initial text, followed by two commits. The first commit adds a new paragraph of text, with the changes highlighted in green and the commit message, “Fix: added a new paragraph to clarify text.” The second commit fixes typos in the text, with the edits highlighted in green and the commit message, “Fix: copy edits.” At the bottom, a comparison shows the document after each commit, illustrating how the file evolves with changes.
8478

79+
Each commit represents **a set of changes** at a specific time.
8580
:::
8681

87-
3. Because you are using git, you can always revert or undo a set of changes in your commit history. While undoing things in git takes a bit more knowledge, knowing it can be done can give you the confidence to make changes without worrying about breaking things!
82+
> **🛠 Do you need to undo changes that you made?** Git lets you revert to an earlier commit, so you don’t have to worry about breaking anything.
83+
8884

8985
:::{figure} /images/github/git-what-are-commits.png
9086
:alt: A diagram explaining Git commits and their role in version control. The top section shows a timeline of circular commits, each paired with a file icon to represent file changes, with the text: “Each commit represents one or more file changes made at a specific point in time.” The middle section highlights the “Latest Commit” on the timeline, showing it as the current state of the repository. The bottom section demonstrates the concept of reverting, with an arrow pointing from a later commit back to a previous one, illustrating that Git allows reverting or going back to earlier commits. The text reads: “You can also always revert or return to a previous commit. This is what makes Git powerful.”
9187

88+
You can always **undo or revert** changes using Git.
9289
:::
9390

94-
## Up next - create a pull request
91+
## Up next: Make a pull request
92+
93+
Once you've committed your changes, you can open a **pull request (PR)** to suggest your edits to the main project.
94+
95+
[Learn how to create a pull request →](pull-request)
9596

96-
Once you have made the changes to the files that you wish to change in your branch, you are ready to open a [pull request](pull-request). You will learn how to do that next.
9797

9898
:::{todo}
99+
99100
It might be cool to show first contributions like my first on to nbconvert could be interesting? Other people might have examples too from the community that we could share with some stories about it??
101+
102+
103+
Github has changed things a bit. If you edit the file in place, it automatically directs you to a pr workflow in the repo that you are in.
104+
105+
So I think we want to break this down into two things
106+
107+
1. The drive-by pull request
108+
109+
* Click on the edit button in the repo that you want to make changes.
110+
* If you don't have permission, it will automatically ask you about making a branch, which will be from your fork.
111+
112+
2. The pr from your fork. If the fork already exists, then you can still edit the file.
113+
100114
:::

github-git/github-social-platform.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ kernelspec:
1313

1414
# Community Interaction Best Practices on GitHub
1515

16-
🚧 These lessons are under heavy construction and will continue to change through March 2025 🚧
1716
## Introduction
1817

19-
GitHub is more than just a platform for hosting code—it’s a **social platform** where developers, researchers, and contributors work together to create, improve, and share projects. Behind every username is a person who deserves respect and appreciation.
18+
GitHub is more than just a platform for hosting code—it’s a **social platform** where developers, researchers, and contributors work together to create, improve, and share projects. Behind every username is a person who deserves respect and appreciation.
2019

2120
This lesson will teach you how to interact constructively and positively within the GitHub community. Whether submitting an issue, reviewing someone else’s work, or asking for help, following these best practices will help you collaborate effectively and maintain a welcoming environment.
2221

@@ -25,16 +24,19 @@ This lesson will teach you how to interact constructively and positively within
2524
Effective communication on GitHub ensures a productive and respectful collaboration environment. Whether you're raising an issue, reviewing code, or contributing to a discussion, these principles will help you interact constructively.
2625

2726
### Respect and professionalism
27+
2828
- Treat everyone with respect, even when disagreements arise.
2929
- Remember that many maintainers and contributors volunteer their time and expertise to the community.
3030
- Use polite and appreciative language when reaching out or giving feedback.
3131
_Example: "Thank you for creating this tool. It's been really helpful!"_
3232

3333
### Patience
34+
3435
- Be understanding if responses to issues or pull requests take time.
3536
- Open-source maintainers often juggle multiple responsibilities outside their projects.
3637

3738
### Clarity and thoughtfulness
39+
3840
- **Use clear and concise language**:
3941
- Clearly describe issues, bugs, or suggestions to avoid confusion.
4042
- Avoid unnecessary jargon or overcomplicating explanations.
@@ -46,19 +48,19 @@ Effective communication on GitHub ensures a productive and respectful collaborat
4648
- Use **reactions** (like 👍 or ❤️) to express agreement or appreciation without cluttering threads with “+1” comments.
4749

4850
### Constructive feedback
51+
4952
- Avoid harsh language, blame, or criticism.
5053
- Frame suggestions as questions or alternatives:
5154
_"What if we try this approach?"_ instead of _"This is wrong."_
5255
- Acknowledge positive aspects alongside suggestions for improvement.
5356

5457
:::{todo}
55-
Move this to the pr page once I create it.
58+
Move this to the pr page once I create it.
5659

5760
## 3. When Contributing to a Repository
5861

59-
60-
6162
### Opening Pull Requests
63+
6264
- **Describe the Change**: Clearly explain what you’re proposing and why it’s needed.
6365
- **Follow Contribution Guidelines**: Adhere to any style or workflow rules outlined in the repository.
6466
- **Be Open to Feedback**: Expect to receive suggestions for improvement and revise your pull request accordingly.
@@ -76,10 +78,12 @@ Here are key social cues to follow:
7678
### 1️⃣ Help Maintainers Keep Track of Who’s Working on What
7779

7880
<i class="fa-solid fa-list-check" style="color: #6ec9c3;"></i> **Open an issue first before submitting a PR.**
81+
7982
- This prevents duplicate work and ensures the maintainers **know who is working on what**.
8083
- If an issue already exists, **comment on it** instead of creating a new one.
8184

8285
<i class="fa-solid fa-triangle-exclamation" style="color: #6ec9c3;"></i> **Avoid surprising maintainers with a PR.**
86+
8387
- Some projects may not be ready for the change you're suggesting.
8488
- Opening an issue first allows maintainers to **provide guidance before you start coding**.
8589

@@ -88,10 +92,12 @@ Here are key social cues to follow:
8892
### 2️⃣ Respect the Project’s Process
8993

9094
<i class="fa-solid fa-book-open" style="color: #6ec9c3;"></i> **Follow issue templates and contribution guidelines.**
95+
9196
- Many projects have structured templates—**use them** to provide all necessary details.
9297
- If guidelines exist, reference them in your issue to show you're **aligning with their workflow**.
9398

9499
<i class="fa-solid fa-compass-drafting" style="color: #6ec9c3;"></i> **Ask before making major changes.**
100+
95101
- If your fix changes functionality, check with maintainers before proceeding.
96102
- A simple “Would this be useful?” can save **time for both you and the maintainers**.
97103

@@ -100,10 +106,12 @@ Here are key social cues to follow:
100106
### 3️⃣ Acknowledge the Maintainers’ Time & Role
101107

102108
<i class="fa-solid fa-handshake-angle" style="color: #6ec9c3;"></i> **Maintain respectful communication.**
109+
103110
- Many maintainers **volunteer their time**—make your requests **clear and easy to understand**.
104111
- If you're waiting on a response, be patient, and after a reasonable time, you can **politely follow up**.
105112

106113
<i class="fa-solid fa-user-tag" style="color: #6ec9c3;"></i> **Tag maintainers (when appropriate).**
114+
107115
- If you know who maintains the repo, consider **@mentioning them** in your issue to establish a connection.
108116
- Example: `@maintainer-name, I’d love to help fix this! Any guidance before I start?`
109117

@@ -112,10 +120,12 @@ Here are key social cues to follow:
112120
### 4️⃣ Communicate Like You Would in Real Life
113121

114122
<i class="fa-solid fa-comments" style="color: #6ec9c3;"></i> **Be polite and professional.**
123+
115124
- Open source is about **collaborating with people you’ve never met**.
116125
- Treat maintainers **as you would a colleague**—respectful and appreciative of their time.
117126

118127
<i class="fa-solid fa-hand-wave" style="color: #6ec9c3;"></i> **Introduce yourself in your first issue comment.**
128+
119129
- If you’re new, a friendly introduction can make it easier to build relationships.
120130
- Example:
121131
> “Hey everyone! 👋 I’m new to contributing here and would love to help with this issue. Let me know if there’s anything I should consider before getting started!”
@@ -125,16 +135,19 @@ Here are key social cues to follow:
125135
### 5️⃣ Build Trust Through Small Contributions
126136

127137
<i class="fa-solid fa-user-check" style="color: #6ec9c3;"></i> **Start small to establish credibility.**
138+
128139
- First contributions aren’t just about code—they're about **building trust with the community**.
129140
- **Small fixes** (like documentation updates or typo corrections) are a great way to get started.
130141

131142
<i class="fa-solid fa-layer-group" style="color: #6ec9c3;"></i> **Contributions add up over time.**
143+
132144
- Even small changes **help the project grow** and demonstrate your commitment.
133145
- Once maintainers recognize your contributions, they’re more likely to engage with your work.
134146

135147
---
136148

137149
### **✨ Summary: Contribute Thoughtfully & Respectfully**
150+
138151
✅ Open issues before submitting PRs to **help maintainers stay organized**.
139152
✅ Follow contribution guidelines to **respect the project’s workflow**.
140153
✅ Communicate professionally to **build relationships in the open-source community**.

github-git/intro.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ resources
7171
:hidden:
7272

7373
0. Your contributing path <your-first-contribution>
74-
2. Get to know the repo <get-to-know-repo>
75-
3. Find an issue <identify-issue>
76-
4. Fork GitHub Repo <fork-repo>
77-
5. Edit & commit files <edit-commit-files>
78-
6. Submit Pull Request <pull-request>
74+
1. Get to know the repo <get-to-know-repo>
75+
2. Find an issue <identify-issue>
76+
3. Fork GitHub Repo <fork-repo>
77+
4. Edit & commit files <edit-commit-files>
78+
5. Submit Pull Request <pull-request>
7979

8080
:::
8181

github-git/pull-request.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,20 @@ You can also click on the commit titles to see the specific changes in each comm
8888

8989
### Step 4: Finalize and submit your PR
9090

91-
Once you've reviewed your PR and evertyhing looks good, it's time to submit it.
91+
Once you've reviewed your PR and everything looks good, it's time to submit it.
9292

9393
Add a descriptive title and write a brief description of your changes. Pull request titles should be concise and descriptive of the content in the pull request. When you have added your
9494
title and description, click on “Create Pull Request” one more time to submit the PR.
9595

96-
If you go to the parent repotiory you will see the PR listed there.
96+
If you go to the parent repository, you will see the PR listed there.
9797

9898
:::{tip}
9999
You can modify the title and description of your pull request at any time - even after you've submitted the pull request.
100100
:::
101101

102102
## Close a Pull Request
103103

104-
If you're not ready to submit, you can close a PR anytime via the **Close pull request** button. You can reopen it later if needed.
104+
You can close a PR anytime via the **Close pull request** button if you're not ready to submit. You can reopen it later if needed.
105105

106106
## Who Can Merge a Pull Request?
107107

0 commit comments

Comments
 (0)