My First Pull Request Journey And How I Synced My Fork

_INTRODUCTION_

As part of my journey to become a better developer, I made my first pull request on GiHub. At first, GitHub felt overwhelming-so many new terms like fork, clone, upstream, and pull request. But step by…


This content originally appeared on DEV Community and was authored by Tejaswini

                               _INTRODUCTION_

As part of my journey to become a better developer, I made my first pull request on GiHub. At first, GitHub felt overwhelming-so many new terms like fork, clone, upstream, and pull request. But step by step, I understood how everything works. In this blog, You'll learn:

1.How to fork and clone a repository
2.How to make a change and create a pull request
3.How to check if your PR has conflicts
4.How to sync your fork with the original project (CLI + GitHub button)
5.Troubleshooting the most common errors (with fixes)

If you are a beginner, this guide will help you too!

First let me help you to learn the Super Shot words

  • FORK : Your copy of someone else's repo on your GitHub.
  • CLONE : Download the code to your computor.
  • BRANCH : A safe area to make changes.
  • COMMIT : A snapshot of your changes with a message.
  • PULL REQUEST: Asking the original repo to accept your changes.
  • UPSTREAM : A nickname for the original repo you forked from.

PROCESS

1)Fork the Repository

  • Open the repository you want to contribute to (I used First Contributions). -Click Fork → this creates your-username/first-contributions under your account.

2)Clone your Fork (to your computer)

  • Please download gitbash and do this in it.(always use command line(GitBash) because it improves your knowledge and experience).
git clone https://github.com/<your-username>/first-contributions.git
cd first-contributions

  • Replace with your GitHub username.

3)Create a New Branch (recommended)

  • working on a branch keeps your main clean.
git checkout -b add-tejaswini
  • Replace add-tejaswini with your branch name.

4)Make Your Change

  • For First Contributions, I edited Contributors.md and added my name.

5)Stage, Commit, and Push

git add Contributors.md
git commit -m "Add Tejaswini to Contributors list"
git push origin add-tejaswini

6)Create a PULL REQUEST(PR)

  • Go to your fork on GitHub.

  • You’ll see a banner: “Compare & pull request.” Click it.
    (Or click Pull Requests → New pull request.)

  • Make sure it compares your branch ➜ original repo’s main.

  • Give a short title and description and click Create pull request.
    Example title: Add Tejaswini to Contributors list
    Added my name to Contributors.md as part of first contribution.

7)Check if Your PR has Conflicts
On your PR page, GitHub shows one of these:

  • "This branch has no conflicts with the base branch."(This means Good)

  • "This branch has conflicts that must be resolved."(This means it needs some fixes)
    You can also see labels like "mergeable"(green) or "conflicting"(red) in the PR list.

8)After Merge: Confirm Everything is OK

  • When maintainers merge your PR, the PR shows "Merged".
  • You can also check the repo's Contributors list to see your update live.

9)Keep Your Fork Updated(Sync with original)

  • Set the original repo as upstream (only once)
git remote add upstream https://github.com/firstcontributions/first-contributions.git
git remote -v   # (optional) verify origin vs upstream

Fetch and merge latest changes.

git fetch upstream
git checkout main
git merge upstream/main
git push origin main

How I Check If My Fork Is In Sync

git fetch upstream
git log upstream/main..main

-No output → you’re up to date.

-Commits listed → you’re behind(merge properly as I shown).

Troubleshooting(Real Errors I Hit & Fixes)

1) fatal: not a git repository (or any of the parent dicrectories):.git
Cause:You are running commands outside the project folder.
Fix:

# Go into the folder you cloned
cd first-contributions
# or clone it first:
git clone https://github.com/<your-username>/first-contributions.git
cd first-contributions

2)"This Branch has conflicts that must br resolved"
Cause:Someone changed the same file/lines after you branched.
Fix:

git fetch upstream
git checkout add-tejaswini        # your feature branch
git merge upstream/main           # brings latest changes
# Open the files with conflict markers <<<<<<< ======= >>>>>> and resolve
git add <fixed-files>
git commit                        # completes the merge
git push origin add-tejaswini

3)Accidentally Stuck in <u>nano</u> editor when writing a commit message
-save: Ctrl + o, press Enter
-Exit: Ctrl + X
4)Already have <u>upstream</u> set(adding it again errors)

Just verify:

git remote -v

If it's wrong:

git remote remove upstream
git remote add upstream https://github.com/firstcontributions/first-contributions.git

Good Practices That Helped Me

- Create a new branch for each change (don’t commit to main).

  • Use clear commit messages: feat: add my name to Contributors list docs: improve README steps
  • Keep your fork synced before starting new work.
  • Prefer Git Bash/terminal—companies value CLI skills.

MY OUTCOME

My PR titled "Add Tejaswini to Contributors list" was merged.
Then I synced my fork so it stays up to date for future contributions.
If you haven't made your first PR yet, try the First Contributions repo, its perfect for beginners. Keep going , you have got this.


This content originally appeared on DEV Community and was authored by Tejaswini


Print Share Comment Cite Upload Translate Updates
APA

Tejaswini | Sciencx (2025-08-19T16:50:03+00:00) My First Pull Request Journey And How I Synced My Fork. Retrieved from https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/

MLA
" » My First Pull Request Journey And How I Synced My Fork." Tejaswini | Sciencx - Tuesday August 19, 2025, https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/
HARVARD
Tejaswini | Sciencx Tuesday August 19, 2025 » My First Pull Request Journey And How I Synced My Fork., viewed ,<https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/>
VANCOUVER
Tejaswini | Sciencx - » My First Pull Request Journey And How I Synced My Fork. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/
CHICAGO
" » My First Pull Request Journey And How I Synced My Fork." Tejaswini | Sciencx - Accessed . https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/
IEEE
" » My First Pull Request Journey And How I Synced My Fork." Tejaswini | Sciencx [Online]. Available: https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/. [Accessed: ]
rf:citation
» My First Pull Request Journey And How I Synced My Fork | Tejaswini | Sciencx | https://www.scien.cx/2025/08/19/my-first-pull-request-journey-and-how-i-synced-my-fork/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.