Wednesday, August 4, 2010

Git And SVN on Mac OS X

I have an old Macbook 2,1 2Ghz Core 2 Duo with 1GB Ram. The OS is Mac OS X 10.4.11 (Tiger). Really trying to upgrade to a later version thus I can start developing for the iPhone platform. But so far the DVDs I have collected wont let it install them. Maybe its Super Drive has a little problem. Anyways, for that reason I'll have to reside with Tiger for a bit and have to try the legacy ways to install softwares on it.

For my professional works I need Git and SVN as daily tools. There are so many solutions for mac. Some are paid and some are Free OSS. I love to use the free and OSS types. I tried to install the SVN and Git but found that macports was not installed.

So, is my choice.

Before this I have installed the macports using

[Moments ago I just found this: worth looking at!]

But one problem occurs!

When I enter at terminal the following and hit return:

sudo port -v selfupdate

I get this error message: port: command not found!

Man, how come its possible? I have just installed it.
Sometimes, acting like a dumb helps you a lot! I just googled the error message to see if anyone exactly had fallen in such problem. Yes! a lot.

So the blog says, I gotta edit the .bash_profile file and paste in the following codes in.
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info

I did so and saved that file. If you are a newbie(dont be ashamed! everybody is at first :)) then you might wonder how to edit the file?

Just open up terminal and type:
sudo nano .bash_profile
paste in the codes above and press ctrl+x so it would save the file.

Yet after I saved it, the port: command not found error was still the case! So, I read the comments at that post. At one place it said you gotta close the terminal after saving. So the .bash_profile gets reloaded :) Yeah thats the idea you just showing the bash that you have macports executables installed somewhere.

So, now its time to update port.
sudo port -d selfupdate

Yes it upgraded it successfully! :)

Now its time to install the git but at page there's no Tiger compatible installer. What to do?

sudo port install git-core +svn

hitting return after entering the above at terminal would produce the following output:
---> Computing dependencies for git-core
---> Dependencies to be installed: curl curl-ca-bundle perl5 perl5.8 libidn gettext expat libiconv gperf ncurses ncursesw openssl zlib pkgconfig p5-error p5-libwww-perl p5-compress-raw-zlib p5-crypt-ssleay p5-html-parser p5-html-tagset p5-io-compress p5-compress-raw-bzip2 p5-uri p5-svn-simple subversion-perlbindings apr apr-util db46 sqlite3 readline cyrus-sasl2 neon serf subversion p5-term-readkey rsync popt

And it will continue to show more and more outputs of the installation process.

It will install git and svn together. But the process will take a long time. Make sure you have highspeed line before applying this command at the terminal.

Guide to get your mac ready!

Its a craze nowadays, that every computer user is tending towards having an iMac or a MacBook or MacBook Pro! Whatever the platform they are working on is not being the factor.

No doubt the Designers(Digital Artists) or DTP professionals use mac if they afford it. But LAMP professionals, .NET professionals (@elijahmanor) and whoever not? Everyone is converting to using this closed and proprietary hardware + software thing. I wont debate about its being too expensive or not. Or, the way Apple restricts us. For me it was relying upon the hardware mainly. My other laptop, which was a cheap HP 520, was damaged due to bad hardware originating from China and the sluggish and then it was stolen(harddisk saved as I kept that with me). So, after that I cant really rely on any other manufacturers laptops. I frequently see laptops dying within 2/3years of use :( I really cant afford to lose my machine so early!

Anyways enough talkative! Let me guide you to make your Mac ready for getting the most out of it.

At first as an OSS lover I would recommend you to have a look at:

Then dont miss these two 50 Essencial app for Mac Beginners
20 Apps of Editors choice by

If you are a developer and you care about the browser compatibility issues for your users then you might need Internet Explorers with the Help of WineBotteler Didn't talk about other emulators as the above links already cover them.

You'd definitely love the Open Source Window management tool Shiftit at Google Codes

I have become a fan of Jeffrey Wey of Nettuts watching his nicely made screencasts. And one of his most favorite tools is the TextExpander(not free :()

If you are a Twitter freak like me then you'd need twitter apps here's a list : 50 essential twitter apps for you can try on your mac

If you are on primitive OS like I'm (Tiger) then you might need legacy X11 for the free Photo editing solution GIMP you definitely would need this link then! Installing X11 for GIMP without an installation CD/DVD

Are you a bangladeshi? Or a Bangali? You'd need the Bangla font or writing tools from

Wondering which SVN client is best on Mac? You might enjoy this StackOverflow debate

Tips, Shortcuts or guides which might save your time!
1. How do I see an invisible file on Mac OS X?
2. Top 50 Terminal commands to customize the way of Mac OS X looks and behaviors!
3. How to make the Mac OS X's Terminal Accessible via hotkey?
4. Looking for cheatsheet? Or Keyboard shortcuts? Get the ultimate resource here.
5. Some code/snippet sharing tools on Mac along with other web tools.
6. Customize the file management with tweaks.
7. Macbook's battery health monitor.
8. Best image editing apps on Mac.
9. Dont forget to keep at eye on for newest and innovative tips-n-tricks on any platform.
Find it at Blessed!