I've been a member on GitHub for 8 years now, and, as far as I can remember, have always merged branches via the web interface - believing it to be too hard and too confusing to even attempt merging via the command-line.
Β Β Β Β Β Β Β Β Β Β Β Β Me looking at the git documentation.
So I set out to learn it, and boy where my fears overexaggerated, you just need to run git merge <branch>
from the branch you want to merge into. π€―
And if you don't want to deal with the clean-up of deleting branches on remote and local, use the github-cli and it's one command gh pr merge
- it accepts more information, such as the pr number, URL or branch to merge, you can view the documentation on merge.
TL;DR
Here's the repo I used to learn how to merge using the command-line containing a detailed README of the steps I took, along with my explanation on how I perceive it to work.
Top comments (8)
Haha! Have no fear of the CLI! It's very powerful!
No real fear attached, it's just that some commands are a bit confusing, and, the documentation for some isn't that user-friendly either, not talking about
git
specifically here, just more in general, just something I've noticed over the years. πBut I do agree, the command-line is darn powerful. π€
What operating system are you using?
Mac. π¨βπ»
My favorites are voidlinux.org and openbsd.org.
As a challenge, see if you can piece together my static site generator from sources on a Mac as I don't provide binaries for it. mkws.sh/srcs.html π
Might wanna fix the title, there is an
,
after "how to" πBut now the title doesn't look as good. π²