How to Merge Branches in Git (Local Workflow Tutorial)

Confused about how to get your code from a feature branch into your main project? In this lesson from **Beshilo Coding Academy**, we master the `git merge` command.

We walk through the process of finishing work on a feature branch (like a Navigation bar or Footer), switching back to the `main` branch, and safely merging those changes locally before pushing to GitHub. I also show you how to handle the common issue of switching between different GitHub accounts on the same computer!

🚀 **In this video, you will learn:**

* How to check your active branch with `git branch`.
* The correct way to use `git switch main` to move between branches.
* Merging features locally using `git merge [branch-name]`.
* How to verify merged files using the `ls` command.
* Pushing the final merged code to your remote GitHub repository.
* **BONUS:** Managing multiple GitHub account credentials on one device.

**Subscribe to Beshilo Coding Academy for more simplified coding guides!** 🔔

—–

### **Timestamp Chapters**

* **0:00 – Pushing the Feature Branch to GitHub**
* **0:14 – Viewing Multiple Branches on GitHub**
* **0:28 – Understanding the “Compare & Pull Request” Prompt**
* **0:37 – How to Switch Branches Locally (`git switch main`)**
* **0:56 – Verifying Missing Files in the Main Branch**
* **1:11 – Returning to the Feature Branch to Check Work**
* **1:32 – The Merge Command: `git merge feature-nav`**
* **1:48 – Confirming the Merge with `ls` and Final Push**
* **2:10 – Switching GitHub Accounts & Clearing Credentials**

—–

**Hashtags:**
#GitMerge #GitHubTips #CodingTutorial #BeshiloCodingAcademy #WebDevelopment #Programming #VersionControl #GitBash #DevOps

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top