1

When I type git reset --help I don't get output in the bash terminal, but a new tab opens in my code editor to reveal some dense HTML. How can I change Git's behavior to display the help message in the bash terminal? I'm not sure how to fix this.

Update:

.gitconfig file:

[core]
    editor = 'C:\\Program Files\\Sublime Text 3\\sublime_text.exe' -w
[user]
    name = name
    email = 'email
    name = 'name
$ type -a git
git is /mingw64/bin/git
git is /mingw64/bin/git
git is /cmd/git

Update 2:

It looks like help.format is set to html, but after my user.name and other info, help.format is set to web (I did this). I tried setting the browser using multiple browser names, but git fails to launch the help command in the browser and still opens in my code editor.

$ git config -l
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.interactive=true
help.format=html
user.name=name
help.format=web

$ git reset --help
git config option web.browser set to unknown browser: edge
Resetting to default...
1
  • Hi Craig, Welcome to DevOps.SE. Thanks for the helpful updates to your question. I've tried extending my answer in a useful direction.
    – chicks
    Jan 2, 2021 at 15:18

2 Answers 2

1

This is not the default behavior of git so you have made some local config change to cause this to happen. Look in your ~/.gitconfig to see if there's anything that doesn't make sense to you. Try commenting it out. The core.pager setting is one of the first things I would check. This stackoverflow question has a variety of options for dealing with this sort of thing.

update 1

I haven't tried to get this sort of thing to work, but according to the docs you can also specify a man.viewer to define the program that is going to run. Do you get any errors if you try git help -w reset?

One work around would be to get the help to show up in the terminal by using git help -m reset. By using the help subcommand instead of subcommand --help you can specify whether you want it to try man, info, or web.

1
  • Also check what git is: type -a git Dec 31, 2020 at 4:17
0

Please check this out to reset your git config setting

https://stackoverflow.com/questions/35853986/easiest-way-to-reset-git-config-file

second thing, if you want output of help then you can use the "git reset -h" command which shows you minimal option of usage in your bash terminal whereas "git reset --help" command will be direct you to html format which is more descriptive explanation of command.

I hope this will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.