make GitX open via Terminal for the repo laying at the current path
Asked Answered
K

2

10

I usually start gitx via the terminal command

$ gitx

Normally, when I'm at /path/to/repo as pwd in terminal, gitx was opening that repos log. I don't know if it was an update or if I changed some settings, but since some time, gitx opens blank, when i hit the command. I googled, and couldn't find. How do I get gitx to open the repo of the directory, I'm in at that moment?

Thanks!

Klusek answered 24/7, 2012 at 7:11 Comment(1)
you might consider changing the accepted answer now that the latter has received more votes (and is an easier solution than the former)Ichthyic
C
21

Open terminal, navigate to the site directory and type this at the prompt:

$ open -a GitX .

--- edit ---

To make this change permanent, open your local .bashrc file:

$ vi ~/.bashrc

Add the following alias wherever you like:

alias gitx='open -a GitX .'

Save and exit, then reload the profile:

$ source ~/.bashrc

All done :) Now you should be able to just type gitx in the repo directory (in terminal) and voila, hope it helps.

Cogitation answered 23/11, 2012 at 12:11 Comment(1)
Consider updating your answer.Propositus
M
42

There is a menu option for this in GitX.

GitX / Enable Terminal Usage…
Movie answered 12/1, 2015 at 12:15 Comment(2)
@Maitreya It is, now that GitX added this option.Cogitation
Please, pay attention that gitx itself does it by symlinking to binary from /usr/local/bin which looks better and more universal than recommended answerWhosoever
C
21

Open terminal, navigate to the site directory and type this at the prompt:

$ open -a GitX .

--- edit ---

To make this change permanent, open your local .bashrc file:

$ vi ~/.bashrc

Add the following alias wherever you like:

alias gitx='open -a GitX .'

Save and exit, then reload the profile:

$ source ~/.bashrc

All done :) Now you should be able to just type gitx in the repo directory (in terminal) and voila, hope it helps.

Cogitation answered 23/11, 2012 at 12:11 Comment(1)
Consider updating your answer.Propositus

© 2022 - 2024 — McMap. All rights reserved.