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

自古美人都是妖i 提交于 2019-12-10 02:32:05

问题


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!


回答1:


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.




回答2:


There is a menu option for this in GitX.

GitX / Enable Terminal Usage…


来源:https://stackoverflow.com/questions/11625836/make-gitx-open-via-terminal-for-the-repo-laying-at-the-current-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!