/github-for-non-tech

How to merge changes using GitHub?

Master GitHub merging with our step-by-step guide: install Git, create branches, commit changes, open pull requests, resolve conflicts, and clean up your repo.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to merge changes using GitHub?

 

Step 1: Install Git and Create a GitHub Account

 

First, you need Git installed on your machine and a GitHub account.

  • Visit the Git website to download the installer for your OS.
  • Follow the installer’s prompts to complete installation.
  • Open your terminal or command prompt and run:

git --version
  • Confirm you see a version number (e.g., git version 2.x.x).
  • If not, revisit the installation steps.
  • Go to github.com and sign up for a free account.
  • Verify your email address to complete registration.

 

Step 2: Configure Git with Your GitHub Credentials

 

Tell Git who you are so commits show proper attribution.


git config --global user.name "Your Name"
git config --global user.email "[email protected]"
  • This sets your name and email globally for all repositories.
  • To verify, run:

git config --global --list

 

Step 3: Create or Clone a Repository

 

You can start a new project or work on an existing one.

  • To create a new repository on GitHub:
  1. Log in to GitHub.
  2. Click the “+” icon and select “New repository.”
  3. Enter a repository name, description, and choose public/private.
  4. Click “Create repository.”
  • To clone an existing repo locally, copy its HTTPS URL and run:

git clone https://github.com/username/repo-name.git
  • Change into the project directory:

cd repo-name

 

Step 4: Create a New Branch for Your Changes

 

Working on a branch keeps main clean and simplifies collaboration.

  • List existing branches:

git branch
  • Create and switch to a new branch:

git checkout -b feature-branch-name
  • Now you’re on feature-branch-name.
  • Always prefix branch names clearly (e.g., feature/, bugfix/).

 

Step 5: Make Changes and Commit Them

 

Edit files using your editor or IDE. When you’re ready to save changes:

  • Check which files changed:

git status
  • Add files to the staging area:

git add file1.txt file2.js
  • Or stage all changes:

git add .
  • Commit with a descriptive message:

git commit -m "Add feature X to improve Y"

 

Step 6: Push Your Branch to GitHub

 

Publish your branch so GitHub can see it.

  • Push the branch upstream:

git push -u origin feature-branch-name
  • The -u flag sets origin/feature-branch-name as the default upstream.
  • On next pushes, you can simply run git push.

 

Step 7: Open a Pull Request on GitHub

 

On GitHub.com, navigate to your repository. You’ll see a banner prompting you to compare & pull request.

  • Click “Compare & pull request.”
  • Enter a clear title and description explaining your changes.
  • Choose reviewers if needed.
  • Click “Create pull request.”

 

Step 8: Review, Resolve Conflicts, and Discuss

 

Team members review your PR and may request changes.

  • If there are conflicts, GitHub shows a warning.
  • To resolve locally, fetch the latest main and rebase or merge:

git fetch origin
git checkout main
git pull
git checkout feature-branch-name
git merge main
# or: git rebase main
  • Fix conflicts in your editor, then:

git add conflicted-file.txt
git commit   # if merging
git rebase --continue  # if rebasing
git push     # may need --force if rebased

 

Step 9: Merge the Pull Request

 

Once approved, merge your feature branch into the main branch.

  • On GitHub, click “Merge pull request.”
  • Choose “Squash and merge,” “Rebase and merge,” or “Merge commit” based on your workflow.
  • Confirm by clicking “Confirm merge.”

 

Step 10: Clean Up Branches

 

After merging, delete stale branches to keep the repo tidy.

  • On GitHub, click “Delete branch” in the PR page.
  • Locally, remove the branch:

git branch -d feature-branch-name
git push origin --delete feature-branch-name
  • Switch back to main and pull the latest changes:

git checkout main
git pull

 

Step 11: Celebrate and Repeat

 

You’ve successfully merged changes using GitHub! Continue the cycle for future features and fixes.

  • Create a new branch for the next task.
  • Follow these steps again to keep history clean and collaborate effectively.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022