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:
1 | $ cd ~ |
Now let’s edit or create our .bashrc file and add an alias to call GitX.
1 2 3 | $ vi .bashrc # press i for INSERT mode, then enter: alias gitx='open -a GitX .' |
That’s it, save the file and reload your profile…
1 | $ source .bashrc |
Now you can navigate to your project and open GitX in the project from the terminal window. Easy.
1 2 | $ 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!