How to configure git help to use Firefox?

I used Git in a windows window, and Git bash always used the web version for reference. I really enjoyed this and 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 the help command:

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

Then I install:

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

Since I usually open firefox, it now cries:

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

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

My question is: how do I configure Git to use the web version and invoke / use firefox so that it does not cause a problem if it is already open?

+4
source share
2 answers

I think you cannot override the command for a famous browser. What works using the name of a browser that is not firefox :

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

I am not an OS X user, but I believe that the shell does not allow passing a verbose argument without avoiding it.

Edit your ~/.gitconfig file ~/.gitconfig and paste the following [web] section:

 [web] browser = open -a Firefox.app 
0
source

Source: https://habr.com/ru/post/1339062/


All Articles