From 9498da4e56611373cbf1df49ea16fd104e09ebe9 Mon Sep 17 00:00:00 2001 From: Ayu Adiati Date: Fri, 9 Oct 2026 14:24:58 +0200 Subject: [PATCH 1/3] docs: group Git & GitHub 101 sections into phases Replace the single "Contributing to Open Source with Git and GitHub" section with four phases: Setting Up, Making a Change, Sending Your Change, and Keeping Your Fork Up to Date. Move syncing and merge conflicts after the pull request, and mark the advanced and profile sections as optional. --- .../open-source/git-101.mdx | 92 ++++++++++++------- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/src/content/resources/developer-resources/open-source/git-101.mdx b/src/content/resources/developer-resources/open-source/git-101.mdx index bef781608..9e4afbd39 100644 --- a/src/content/resources/developer-resources/open-source/git-101.mdx +++ b/src/content/resources/developer-resources/open-source/git-101.mdx @@ -50,7 +50,9 @@ If you are new to open source, see the Keeping Your Fork Up to Date. + + + + + +## Keeping Your Fork Up to Date + +Use this part only when you need it. You need it when the project gets new changes while you work, or when GitHub shows conflicts on your pull request. + ### Syncing Your Fork with `upstream` While you work on your changes locally, someone else may change the same file. That person may already have their pull request merged into the default branch, such as `main`, of the `upstream` repository. @@ -221,13 +274,13 @@ Always make sure that your fork is up to date with the `upstream` repository. height="174" /> - If you do not see the button, your fork has no new changes. In that case, push your changes. Then make a pull request. + If you do not see the button, your fork has no new changes. In that case, you do not need to sync. Now your fork has the same updates as the `upstream` repository. ### Synchronizing Changes Locally -Now that your `origin` repository is in sync with the `upstream` repository, synchronize these changes locally. That way, you already have the most recent content when you push your changes. +Now that your `origin` repository is in sync with the `upstream` repository, synchronize these changes locally. That way, you already have the most recent content when you push your next changes. Fetch and merge the latest update into your working branch. To do so: @@ -303,35 +356,6 @@ After you commit the merge, pull the updated branch to your local repository bef 4. Save the file. Repeat for each conflicting file. 5. When you resolve all the conflicts, add and commit the changes. -### Pushing Changes - -After you sync your branch and commit your changes, push your branch to the `origin` repository. - -To do so, run this command in your terminal: - -```bash -git push origin BRANCH-NAME -``` - -Change `BRANCH-NAME` to the name of your working branch. - -### Making a Pull Request - -After you push your changes to the `origin` repository, you can submit the changes to the `upstream` repository by making a pull request. - -A pull request allows the maintainers to review your work, comment, and request any necessary changes. They then decide whether to merge your changes into the project codebase. - -To make a pull request: - -1. Go to the `upstream` repository on GitHub. If you recently pushed changes, a banner at the top of the page shows a **Compare & pull request** button. Click it. -2. If you do not see the banner, click the **New pull request** button instead. -3. GitHub takes you to the "Open a pull request" form, where you write a description of your pull request. Many projects provide a pull request template in the form. If the project does not, read its contributing guidelines (usually in the `CONTRIBUTING.md` file) and follow the conventions described there. -4. When you are ready, click the **Create pull request** button. - -You have made your pull request. - -If a maintainer requests changes, you can work on the requested changes and push new commits to the same branch. GitHub adds them to the pull request automatically. - @@ -344,6 +368,8 @@ The following workflows are helpful when collaborating with another person in op +You can skip this section when you contribute on your own. + ### Collaborating Asynchronously on a Shared Branch Between Two Different Forks You and your teammate, Alice, each forked the same repository. You work on the same issue in the same file, but not at the same time. Each of you follows the same steps. @@ -416,6 +442,8 @@ You do not need to add your own name, because you are the one who commits the ch ## Getting the Most Out of Your GitHub Profile +This section is optional. You do not need it to make a contribution. + You can customize your GitHub profile. Add a short bio, a website, and social media links. Pin the repositories that show your best work. Your profile then works like a mini portfolio. Date: Fri, 9 Oct 2026 14:43:48 +0200 Subject: [PATCH 2/3] docs: add push step after resolving conflicts locally The conflict steps now come after the pull request, so a reader who resolves conflicts locally must push the branch to update the pull request. --- .../resources/developer-resources/open-source/git-101.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/resources/developer-resources/open-source/git-101.mdx b/src/content/resources/developer-resources/open-source/git-101.mdx index 9e4afbd39..ef94957f5 100644 --- a/src/content/resources/developer-resources/open-source/git-101.mdx +++ b/src/content/resources/developer-resources/open-source/git-101.mdx @@ -355,6 +355,7 @@ After you commit the merge, pull the updated branch to your local repository bef 3. For each conflict, click **Accept Current Change**, **Accept Incoming Change**, or **Accept Both Changes**. They have the same meaning as the options on GitHub. 4. Save the file. Repeat for each conflicting file. 5. When you resolve all the conflicts, add and commit the changes. +6. Push the branch to the `origin` repository. GitHub updates your pull request automatically. From 769a6aee057196ab2839f47e714bb1879121f94f Mon Sep 17 00:00:00 2001 From: Ayu Adiati Date: Fri, 9 Oct 2026 15:03:26 +0200 Subject: [PATCH 3/3] docs: fix formatting of push step --- .../resources/developer-resources/open-source/git-101.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/resources/developer-resources/open-source/git-101.mdx b/src/content/resources/developer-resources/open-source/git-101.mdx index ef94957f5..4781a7c91 100644 --- a/src/content/resources/developer-resources/open-source/git-101.mdx +++ b/src/content/resources/developer-resources/open-source/git-101.mdx @@ -355,7 +355,7 @@ After you commit the merge, pull the updated branch to your local repository bef 3. For each conflict, click **Accept Current Change**, **Accept Incoming Change**, or **Accept Both Changes**. They have the same meaning as the options on GitHub. 4. Save the file. Repeat for each conflicting file. 5. When you resolve all the conflicts, add and commit the changes. -6. Push the branch to the `origin` repository. GitHub updates your pull request automatically. +6. Push the branch to the `origin` repository, as described in Pushing Changes. GitHub updates your pull request automatically.