首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Git:`rebase -i`不工作(它不打开`.git/rebase-merge/git-rebase-todo`‘)

Git:`rebase -i`不工作(它不打开`.git/rebase-merge/git-rebase-todo`‘)
EN

Stack Overflow用户
提问于 2018-02-15 04:27:12
回答 2查看 2K关注 0票数 5

git rebase -i的正常过程中,如下所示(=>表示终端命令提示符):

代码语言:javascript
复制
=> git logg
* 7bec976 (HEAD -> develop, origin/develop) Update JANDI task: add Bitcoin topic
* e03aecc Update production.txt:remove pandas and set celery-beat version
* baaaf4b Update JANDI task: Fix link bug
* bb422af Update Procfile: on flower
* 733ca41 Implement JANDI task

rebase -i

代码语言:javascript
复制
=> git rebase -i 733ca41

它将通过编辑器打开.git/rebase-merge/git-rebase-todo

代码语言:javascript
复制
1 pick bb422af Update Procfile: on flower
2 pick baaaf4b Update JANDI task: Fix link bug
3 pick e03aecc Update production.txt:remove pandas and set celery-beat version
4 pick 7bec976 Update JANDI task: add Bitcoin topic
5
6 # Rebase 733ca41..7bec976 onto 733ca41 (4 commands)
7 #
8 # Commands:
9 # p, pick = use commit
10 # r, reword = use commit, but edit the commit message
11 # e, edit = use commit, but stop for amending
12 # s, squash = use commit, but meld into previous commit
13 # f, fixup = like "squash", but discard this commit's log message
14 # x, exec = run command (the rest of the line) using shell
15 # d, drop = remove commit
16 #
17 # These lines can be re-ordered; they are executed from top to bottom.
18 #
19 # If you remove a line here THAT COMMIT WILL BE LOST.
20 #
21 # However, if you remove everything, the rebase will be aborted.
22 #
23 # Note that empty commits are commented out

但是,在我的Linux 16.04 LTS上,它的行为如下:

代码语言:javascript
复制
=> git rebase -i 733ca41
Successfully rebased and updated refs/heads/develop.
=>

什么都没打开什么也没发生..。

我不知道这个命令有什么问题。除rebase -i之外,任何其他git命令都能很好地工作。

需要你的帮助。谢谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-02-15 05:36:33

检查最新的2.16.x版本的Git是否仍然存在此问题。

但是首先,作为从这个答案中可以看到,检查环境变量GIT_SEQUENCE_EDITOR的值。

如果设置为“:”,将使编辑器不可见。

注意:设置配置不应该是必要的:

未配置时,将使用默认提交消息编辑器。

因此,请确保正确设置了core.editor,如"文本编辑器与Git的关联“中所示。

票数 4
EN

Stack Overflow用户

发布于 2018-02-16 06:21:16

git config --global sequence.editor vim将起作用:)

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48799947

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档