Shortcut To Open GitX In The Current Project

back to tech articles
Mac OS X, Git, GitX

Here’s a very quick tip for newbies.

Instead of navigating to the project via finder each time you need to view the git logs, let’s create a shortcut so you can do it from the terminal window.

Open terminal and change into your home directory:

$ cd ~

Now let’s edit or create our .bashrc file and add an alias to call GitX.

$ vi .bashrc
# press i for INSERT mode, then enter:
alias gitx='open -a GitX .'

That’s it, save the file and reload your profile…

$ source .bashrc

Now you can navigate to your project and open GitX in the project from the terminal window. Easy.

$ cd Sites/mywebproject
$ gitx

Shortcuts in Mac and Linux systems save you loads of time for repetitive tasks (duh) and they are very easy to implement. It’s worth taking 5 minutes to set up a shortcut so that your workflow will be greatly improved.

Happy shortcutting!

Leave a Reply

Your email address will not be published. Required fields are marked *