GIT-WEB--BROWSE(1)

πŸ’– GIT-WEB--BROWSE(1) πŸ’–

okay so bestie, welcome to the git-web--browse glow-up β€” it's the little git helper script that pops your URLs open in a browser tab, and honestly? iconic behavior. this is a page out of the Git Manual, and we're gonna walk through it together, no cap. πŸŽ€


✨ NAME ✨

git-web--browse β€” the Git helper script that launches a web browser for you πŸ¦‹


✨ SYNOPSIS ✨

git web--browse [<options>] (<URL>|<file>)...

✨ DESCRIPTION ✨

so the vibe here is: this script tries, as much as possible, to display the URLs and FILEs you pass as arguments as HTML pages in new tabs on a browser that's already open. literally the "don't make me open a whole new window" energy. πŸ’…

the following browsers (or commands) are currently supported, and yes, that's the whole list, don't come for me:

  • firefox (this is the default under X Window when not using KDE)
  • iceweasel
  • seamonkey
  • iceape
  • chromium (also supported as chromium-browser)
  • google-chrome (also supported as chrome)
  • konqueror (this is the default under KDE, see Note about konqueror below πŸ‘€)
  • opera
  • w3m (this is the default outside graphical environments)
  • elinks
  • links
  • lynx
  • dillo
  • open (this is the default under Mac OS X GUI)
  • start (this is the default under MinGW)
  • cygstart (this is the default under Cygwin)
  • xdg-open

custom commands may also be specified. slay, flexible queen. 🌈


✨ OPTIONS ✨

  • -b <browser>, --browser=<browser> β€” use the specified browser. it must be in the list of supported browsers, so no making stuff up, bestie. 🫢
  • -t <browser>, --tool=<browser> β€” same as above, just a different name for it.
  • -c <conf.var>, --config=<conf.var> β€” CONF.VAR gets looked up in the Git config files. if it's set, then its value specifies the browser that should be used. cute, right? πŸ’œ

✨ CONFIGURATION VARIABLES ✨

🌸 CONF.VAR (from -c option) and web.browser

the web browser can be specified using a configuration variable passed with the -c (or --config) command-line option, or the web.browser configuration variable if the former is not used. so like, -c wins if you brought it, otherwise web.browser steps in. ✨

🌸 browser.<tool>.path

you can explicitly provide a full path to your preferred browser by setting the configuration variable browser.<tool>.path. for example, you can configure the absolute path to firefox by setting browser.firefox.path. otherwise, git web--browse assumes the tool is available in PATH. easy peasy. πŸ“

🌸 browser.<tool>.cmd

when the browser, specified by options or configuration variables, is not among the supported ones, then the corresponding browser.<tool>.cmd configuration variable will be looked up. if this variable exists then git web--browse will treat the specified tool as a custom command and will use a shell eval to run the command with the URLs passed as arguments. custom command couture, iykyk. 🧚

lowkey heads up: that's a shell eval, so it's running your command string for real β€” that's straight from the page, not me being dramatic. πŸ’€

✨ NOTE ABOUT KONQUEROR ✨

when konqueror is specified by a command-line option or a configuration variable, we launch kfmclient to try to open the HTML man page on an already opened konqueror in a new tab if possible. sneaky little middleman, we love to see it. πŸ‘‘

for consistency, we also try such a trick if browser.konqueror.path is set to something like A_PATH_TO/konqueror. that means we will try to launch A_PATH_TO/kfmclient instead. plot twist!

if you really want to use konqueror, then you can use something like the following:

[web]
        browser = konq

[browser "konq"]
        cmd = A_PATH_TO/konqueror

🌸 Note about git-config --global

note that these configuration variables should probably be set using the --global flag, for example like this:

$ git config --global web.browser firefox

as they are probably more user specific than repository specific. see git-config(1) for more information about this. bestie, keep your browser prefs personal, they're your main character energy. 🌟


✨ GIT ✨

part of the git(1) suite πŸ’–


okay that's the whole page, mwah! 😭🫢 this little number is from Git 2.56.0, dated 2026-09-27 β€” so go forth, open those tabs, and remember: new tab, who dis. πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from