…Well, not really a “new” Mac user – I’ve been using a Mac mini for our home theatre needs for six years, so I have a pretty good handle on consumer-level operations of a Mac.
And I’m not entirely new to Git – I was using various GUI Git clients on my previous Windows system, so that I understand the basics of cloning a repo, pulling, pushing and merging.
Let’s be clear up front: I am the Product Owner and Interaction Designer for my team’s applications, not a full-time developer. Thus, I’m looking for something that makes it quick and convenient to make small changes to the codebase (swapping strings, editing CSS, that kind of thing). I don’t do this frequently enough to learn the ins-and-outs of Git, nor do I have the patience to fight with command line tools (yet – talk to me in a year once I’ve become more comfortable with the concepts).
Now that I’ve taken the leap to using a MacBook full time for my work however, I’m feeling a little lost and trying to get back to productive before I get called out for taking a leap into all-new learning opportunities.
So: I want to get back to the point of being able to simply Clone, Pull, Push and Merge. I need to answer three basic questions:
- One tool or many?
- Where to clone the code on my drive?
- Which GUI tool
I’m afraid of making a mistake that would require me to ask for help from one of my younger colleagues, for whom this kind of thing hasn’t been a problem since they hit puberty. I don’t mind cleaning up after my mistakes – mastery of my domain is pretty satisfying after all – but I’d hate to get stuck with some half-uninstalled broken setup that I couldn’t google (giggle) my way out of.
Q1: One tool or many?
First question I need to answer is: does every Git client for Mac have its own tools, or is there a “base” set of tools and then GUI front-ends that make the basic operations more convenient? [My experience on Windows with toolchains like this is that the GUI front-ends were really just there to shell me away from the internals of the command line – which is really fine by me – letting the computer abstract the details is what the human race needs. Other experiences led me to believe some smart folks make sure everything is self-contained in their solutions, but it’s often hard to know up front which is which.]
It took me a few days (and downloading a bunch of popular clients) to stumble on what feels like a good, reliable first step: run git from a Terminal window, and follow Mac OS’ recommendations to download the Xcode developer tools. One-click installation: done. Confirmed the tools are working when I ran the git command again and got a nice “usage” output:
Q2: Where to Clone?
Next question: where the hell do I drop the cloned repos on my system? I suspect there’s a different answer for every developer and hack like me, but I’d still like to get this right once and then leave it the hell alone. I cloned repos once six months ago on Windows and didn’t touch them again since.
Create a !Code folder inside my /Documents? Create a separate folder in my profile (e.g. /users/mike/Code)? Or somewhere else? One factor that biases me to a folder outside /Documents is that we use Syncplicity at work, and I’ve heard the stories of fights between the editor/compiler and Synplicity leading to dozens of duplicated files. Probably easier to avoid that by never syncing the code (since git does that job when you tell it), so keep it separate I guess I will.
Q3: Which GUI?
Third question: which GUI client to use? I installed Gitbox, Github and SourceTree right off the bat. Turns out Github only works with github.com and Github Enterprise projects, so forget that.
I’d previously used Git Extensions and TortoiseGit on Windows, but Tortoise is a Windows-only shell extension, and Git Extensions on Mac requires Mono. While I used to do some coding in C# and still feel more comfortable with strongly-typed languages (maybe it’s the pedantic or OCD streak in me), my gut tells me to avoid intermediate languages on my shiny clean Mac as long as possible. (No Java for me either, at least as long as possible – good god do I hate those ridiculously frequent security updates that are needed. Why Mac OS seems to still include Adobe Flash Player without me even asking for it boggles the mind.)
GitX and GitX[L] were recommended, but they appear to be dead projects – and I’ve learned not to bother with dead projects for otherwise-lively needs (like keeping up with modern development trends).
A few giggle (sic) searches led to discussions like this, which mention things like:
- “On the other hand, Source Tree works very well. Albeit it requires a bit more understanding of git itself.”
- “I’ve tried GitX and wasn’t very impressed. It seems to missing many of the git commands and I have to use the terminal on a regular basis.”
- “[SourceTree is a] Proprietary app from Atlassian. Not such kawai UI as in GitX, but it works. Medium place between GitX and Git Extension IMHO.”
The other thing is the price. I get it – every good piece of software should reward the developer with the ability to support themselves if they’re interested, and I have contributed $$ many times over the years to good projects. That said, if I can get along with the free tools well enough for my demands, and the project isn’t dead, that’s usually where I land.
So looks like I’m landed on SourceTree.
I setup my Project folder as /Users/mike/Code, went exploring the rest of the menus, and that’s when I discovered that SourceTree ships an “Embedded Git” – currently at 2.2.1, versus the Apple Git-50 version of 1.9.3 which came with Xcode. D’oh! (Yeah, I *could* switch to the system git and see what happens, but really why bother?)
Last step? Grab a repo URL and cross fingers. Plug it into Source URL, fill in my password, and things…look…golden.
Thanks for playing along.