如何配置git帮助使用Firefox? [英] How can I configure git help to use Firefox?

查看:178
本文介绍了如何配置git帮助使用Firefox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用Git,git bash总是使用web版本来获得帮助。我真的很喜欢这一点,我想在我的Mac上做同样的事情。



我跑了:

  $ git config --global help.format web 
$ git config --global web.browser firefox

help 命令的输出是:

pre > $浏览器firefox不可用作'firefox'。

然后设定:

pre > $ git config --global browser.firefox.path /Applications/Firefox.app/Contents/MacOS/firefox-bin

因为我通常打开firefox,所以现在哭了:


Firefox的副本已经打开。一次只能打开一个Firefox的副本。

我希望git使用的真正命令是打开-a Firefox.app somefile 。我尝试设置 browser.firefox.cmd 没有用。



我的问题:如何配置git网络版本和调用/使用Firefox的方式,不会导致问题,如果它已经打开?

解决方案

我猜你不能覆盖已知浏览器的命令。使用浏览器名称不是 firefox

  git config --global web.browser ff 
git config --global browser.ff.cmdopen -a Firefox.app


I was using Git on a Windows box and the git bash always used the web version for help. I really liked this and I am trying to do the same on my mac.

I ran:

$ git config --global help.format web
$ git config --global web.browser firefox

and the output of a help command is:

$ The browser firefox is not available as 'firefox'.

I then set:

$ git config --global browser.firefox.path /Applications/Firefox.app/Contents/MacOS/firefox-bin

Since I usually have firefox open, it now cries:

A copy of Firefox is already open. Only one copy of Firefox can be open at a time.

The real command I would like git to use is open -a Firefox.app somefile. I tried setting browser.firefox.cmd with no avail.

My question: how can I configure git to use the web version and call/use firefox in a way that won't cause issue if it's already open?

解决方案

I guess you can't override the command for a known browser. What worked is using a browser name that is not firefox:

git config --global web.browser ff
git config --global browser.ff.cmd "open -a Firefox.app"

这篇关于如何配置git帮助使用Firefox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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