通过终端打开GitX以在当前路径上放置存储库 [英] make GitX open via Terminal for the repo laying at the current path

查看:126
本文介绍了通过终端打开GitX以在当前路径上放置存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常通过终端命令启动gitx

I usually start gitx via the terminal command

$ gitx

通常,当我在终端中的pwd处/path/to/repo时,gitx正在打开该回购日志.我不知道这是更新还是更改了某些设置,但是一段时间以来,当我按下命令时,gitx打开为空白.我用Google搜索,但找不到.如何获取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?

谢谢!

推荐答案

打开终端,导航到站点目录,并在提示符下键入:

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

$ open -a GitX .

---编辑---

要使此更改永久生效,请打开本地的.bashrc文件:

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

所有操作都已完成:)现在,您应该可以在repo目录(在终端中)中输入gitx,瞧,希望对您有所帮助.

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

这篇关于通过终端打开GitX以在当前路径上放置存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆