git branch之后出现end,无法退出终端

简介: git branch之后出现end,无法退出终端

现象

在mac环境下,使用iterm2,当输入git branch后,终端除了输出了当前分支名称,还出现了(END)。
恐怖的事情出现了,无论是esc、exit、或者ctrl+c,都无法退出当前终端。
如图所示
image.png
image.png

解决方案

1.输入q退出

输入q退出,只是这一次退出,属于治标不治本。想要一劳永逸,看第二个方案

2.删除git branch分页

新开一个终端,输入下列命令,即可完成git branch分页删除配置。

git config --global pager.branch false

image.png

如果想具体理解git config --global pager的原理及实现,可以去看下述文章
https://www.yuque.com/morange/morange/cpctrtfyw39d4frl

目录
相关文章
|
7月前
|
编译器 开发工具 git
【Git异常】You are in ‘detached HEAD‘ state, which means that you‘re not on any branch Checkout a branch
【Git异常】You are in ‘detached HEAD‘ state, which means that you‘re not on any branch Checkout a branch
81 0
|
2天前
|
开发工具 git
git branch (branchname)
git branch (branchname) 是 Git 中创建和管理分支的一种命令。通过这个命令,你可以根据指定的分支名创建一个新的分支,或者跳转到已经存在的分支上。branchname 参数是可选的,如果不指定,则默认创建或切换到主分支(master 或 main)。
65 8
|
2天前
|
开发工具 git
避免git产生Merge branch 'foo' into 'bar'提交
避免git产生Merge branch 'foo' into 'bar'提交
35 3
|
2天前
|
开发工具 git
idea的Terminal终端操作git时, git log的注释乱码问题
最近工作比较清闲, 于是在自己的项目中测试: 假如git reset回滚到之前的版本, 后悔了. 应该如何回撤回回滚, 但是又被一些小问题拌住了...
67 0
|
10月前
|
Shell 开发工具 git
Webstorm 终端 git log 乱码问题
Webstorm 终端 git log 乱码问题
154 0
|
10月前
|
Shell 开发工具 git
2021年了, 如何将 Git Bash 设置为 VSCode 的终端?
2021年了, 如何将 Git Bash 设置为 VSCode 的终端?
183 0
|
开发工具 git
git branch分支怎么玩来看看吧
有时候我们在开发的过程中,难免有很多不一样的情况,有时候可能就需要根据本地的分支进行创建临时的分支,然后又有时候需要根据同事创建的远程分支,再来创建本地分支。
97 0
|
Shell 开发工具 git
git fatal: branch ‘master‘ does not exist
git fatal: branch ‘master‘ does not exist
487 0
git fatal: branch ‘master‘ does not exist
|
开发工具 git
git提示:There is no tracking information for the current branch
git提示:There is no tracking information for the current branch
158 0
git提示:There is no tracking information for the current branch
|
缓存 开发工具 git
git将本地项目上传到线上时遇到的一些问题:There is no tracking information for the current branch.
git将本地项目上传到线上时遇到的一些问题:There is no tracking information for the current branch.
162 0
git将本地项目上传到线上时遇到的一些问题:There is no tracking information for the current branch.

相关实验场景

更多