The Joy of GitHub for Mac
Recently I discovered the joy of GitHub for Mac.
When I first got started learning code things and using GitHub, I was shown how to use GitHub for Mac as I think it’s assumed that it’s the easiest way for a non-technical to get started pushing up code. As a complete beginner at the time, it was still confusing though cause new words are hard..fork, push, pull, pull request, etc. and GHfM uses different words like sync instead of push/pull. Also using GHfM requires learning to navigate a new interface. (Also known as a graphical user interface or GUI – another new word I got to know!)
I used GitHub for Mac approximately once then learned about the terminal. I quickly realized that if I was going to be attempting to learn code things, working in the terminal was something to be embraced. I set aside GHfM and leaned into using the terminal for branching, committing, and pushing in the terminal.
For a long time, these have been my go-to commands:
cd (.., ~, etc)
git checkout -b new-branch
git add .
git commit -m “initial commit”
(create a new repo on github.com)
git remote add origin git@etcetcetc
git push origin new-branch
(click ‘pull request’ on github.com and type in message, submit, & merge)
Over and over and over.
Lately, I’ve gotten more lazy and realized that with the click of a button I can use GitHub for Mac instead of typing out all the things! Also, it’s super easy to add a couple files at a time and the interface is really nice for viewing diffs.
One example of how I use GitHub for Mac now is for cloning:
In terminal I would first `cd` into my project directory then type ‘git clone’ and copy and paste the clone url from github.com.
In GHfM, I simply click ‘clone in desktop’ on the web & 2 more clicks later, it is in my projects directory.
I’m really glad I started learning git commands in the terminal and still do use the terminal the majority of the time, however, now that I have an understanding of the basics, I’m happy to embrace GitHub for Mac for all the ways it saves me time.
For more GHfM in action here is a video of how to push up a simple web project using the GUI.
Side note: A lot of people associate GitHub as a place to work on code projects with other people however up until recently, I’ve only used it by myself to just push up small projects. I’m glad I’ve done this because it’s allowed me to become comfortable with the basics through all the repetition. Now that I’m working on projects with others more, I’ve already got a good foundation to build off of. :rocket: