Git: Stop using VIM on "git branch"

Created on 6 Aug 2019  Â·  6Comments  Â·  Source: git-for-windows/git

  • [x] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.22.0.windows.1
cpu: x86_64
built from commit: d003d728ffa6c0006da875ec6318d3f6b28a4ddb
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.14393]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: SublimeText
Custom Editor Path: 
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Enabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Normal, vanilla, cmd

git branch
  • What did you expect to occur after running these commands?

Show all branches

  • What actually happened instead?

Showed some branches, then a return with a : requiring me to press Enter for every new line.
Unable to kill the command through standard CTRL+C, instead having to press some 1980's vim bullshit.
This only occurs if there is not enough room to display all response, forcing me to needlessly maximize the command prompt just to run git branch.
Been using git for years and never had this happen before. I just updated git recently.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

* insert URL here *

All 6 comments

Halt

On Aug 6, 2019 1:19 PM, The Jared Wilcurt notifications@github.com wrote:

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

$ git --version --build-options

git version 2.22.0.windows.1
cpu: x86_64
built from commit: d003d728ffa6c0006da875ec6318d3f6b28a4ddb
sizeof-long: 4
sizeof-size_t: 8

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

$ cmd.exe /c ver

Microsoft Windows [Version 10.0.14393]

  • What options did you set as part of the installation? Or did you choose the
    defaults?

One of the following:

type "C:Program FilesGitetcinstall-options.txt"

Editor Option: SublimeText
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Enabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Normal, vanilla, cmd

  • What commands did you run to trigger this issue? If you can provide a
    Minimal, Complete, and Verifiable examplehttp://stackoverflow.com/help/mcve
    this will help us understand the issue.

git branch

  • What did you expect to occur after running these commands?

Show all branches

  • What actually happened instead?

Showed some branches, then a return with a : requiring me to press Enter for every new line.
Unable to kill the command through standard CTRL+C, instead having to press some 1980's vim bullshit.
This only occurs if there is not enough room to display all response, forcing me to needlessly maximize the command prompt just to run git branch.
Been using git for years and never had this happen before. I just updated git recently.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

* insert URL here *

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/git-for-windows/git/issues/2281?email_source=notifications&email_token=AC65ZPTMFWSEFQ6AAQKHLK3QDG6EFA5CNFSM4IJZAFC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDWO5ZQ, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC65ZPSOTMBDSTAMDKL7KK3QDG6EFANCNFSM4IJZAFCQ.

Sought

On Aug 6, 2019 1:19 PM, The Jared Wilcurt notifications@github.com wrote:

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

$ git --version --build-options

git version 2.22.0.windows.1
cpu: x86_64
built from commit: d003d728ffa6c0006da875ec6318d3f6b28a4ddb
sizeof-long: 4
sizeof-size_t: 8

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

$ cmd.exe /c ver

Microsoft Windows [Version 10.0.14393]

  • What options did you set as part of the installation? Or did you choose the
    defaults?

One of the following:

type "C:Program FilesGitetcinstall-options.txt"

Editor Option: SublimeText
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Enabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Normal, vanilla, cmd

  • What commands did you run to trigger this issue? If you can provide a
    Minimal, Complete, and Verifiable examplehttp://stackoverflow.com/help/mcve
    this will help us understand the issue.

git branch

  • What did you expect to occur after running these commands?

Show all branches

  • What actually happened instead?

Showed some branches, then a return with a : requiring me to press Enter for every new line.
Unable to kill the command through standard CTRL+C, instead having to press some 1980's vim bullshit.
This only occurs if there is not enough room to display all response, forcing me to needlessly maximize the command prompt just to run git branch.
Been using git for years and never had this happen before. I just updated git recently.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

* insert URL here *

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/git-for-windows/git/issues/2281?email_source=notifications&email_token=AC65ZPTMFWSEFQ6AAQKHLK3QDG6EFA5CNFSM4IJZAFC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDWO5ZQ, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC65ZPSOTMBDSTAMDKL7KK3QDG6EFANCNFSM4IJZAFCQ.

That's not vim that's less. Git has used a pager in git branch by default (when listing branches) since 2.16.0 (Jan 2018). You can exit less by pressing Q.

You can disable this behaviour for a single call of git branch with the --no-pager option. You can disable it for all calls of git branch by setting the pager.branch config option to false. You can disable it for all Git commands by setting the core.pager config option to false.

Edit: You can also navigate in less using the arrow keys (and pg up/down IIRC) instead of enter.

@rimrul

I ran git config --global core.pager false and now git branch doesn't return anything at all.

Also tried

git config --global core.pager true
git config --global core.pager ''
git config --global core.pager

Based on:

None of them work, git branch still returns nothing

Update:

git config --global core.pager ""

that works. really annoying that it isn't documented properly

really annoying that it isn't documented properly

The documentation of any Open Source project is only as good as contributors make it. So basically what you are saying is that you failed to make it better, because you are as much of a potential contributor as literally everybody else.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Snaptags picture Snaptags  Â·  4Comments

drewnoakes picture drewnoakes  Â·  5Comments

Jarmos-san picture Jarmos-san  Â·  3Comments

daxelrod picture daxelrod  Â·  4Comments

educhana picture educhana  Â·  5Comments