Vairoj writes

GitX couldn't connect to app server

If you install GitX through MacPorts and try launching it from the the shell, you might be greeted with an error:

% gitx
Couldn't connect to app server!

What you need to do you is to launch GitX.app at least once. MacPorts puts it at /Applications/MacPorts/GitX.app. It seems that some initialization is required before the command-line tool can be used.