Star

Created With

linkMerging your Git Branches

With GitHub merging is made easy!

linkYou can of course merge with your CLI using the below snippet

1link$git checkout <branchname>

2link$git merge master

3link$# finally push your local changes to the remote repo

4link$git push

Screen-Shot-2021-03-13-at-11-07-35-am.png

Or even in one line like so..

git merge <branchname> master

linkHowever, using GitHub we can interactively merge a branch. It's personally my favourite way to merge branches.

To get started, create a branch and push it to your remote repository (stored on GitHub)

Screen-Shot-2021-03-13-at-11-01-42-am.png

linkYou will then see it listed under 'Branches' in the GitHub page for your repo

Screen-Shot-2021-03-13-at-10-45-33-am.png

linkEven better, GitHub will auto-display your recently pushed branches and ask you to PR them!

Screen-Shot-2021-03-13-at-11-01-16-am.png

linkFrom there we can create a PR known as "Pull Request" (More about that later!)

Screen-Shot-2021-03-13-at-11-16-53-am.png

Merging your Git BranchesYou can of course merge with your CLI using the below snippetHowever, using GitHub we can interactively merge a branch. It's personally my favourite way to merge branches.You will then see it listed under 'Branches' in the GitHub page for your repoEven better, GitHub will auto-display your recently pushed branches and ask you to PR them!From there we can create a PR known as "Pull Request" (More about that later!)
Content

Home Backstory Why Git? Setting Up GitHub GitHub CLI Your GitHub Profile GitHub Pages Creating A New Repo Cloning A Repository Your First Commit Ignoring Files In Git Stashing Your Changes Branching With Git Merging Git Branches Rebasing Vs Merging Git Workflows Fork And Pull Flow Your First Pull Request Automated Security Alerts Seeing The Differences Removing/Deleting Files Reverting Your Commits Configuring your Git Commit Templates Creating Shortcuts Dotfile Management Sponsoring Open Source Handy Commands Thank You



Developer Student Clubs

logo2.png