5

In normal process of git rebase -i would be look like this (=> means terminal command prompt):

=> 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

And rebase -i:

=> git rebase -i 733ca41

It would open .git/rebase-merge/git-rebase-todo via editor:

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

HOWEVER, on my Linux 16.04 LTS, it behaves like this:

=> git rebase -i 733ca41
Successfully rebased and updated refs/heads/develop.
=>

Nothing opened, nothing happened...

I have no idea what's wrong with this command. Any other git commands work perfectly except rebase -i

Need your helps. Thanks

user3595632
  • 5,380
  • 10
  • 55
  • 111
  • 2
    Check whether your Git editor settings are correct (e.g., try running `git config --edit`). That's one shot-in-the-dark, as it is not at all clear what is happening here. – torek Feb 15 '18 at 05:36

2 Answers2

4

Check if the issue persists with the latest 2.16.x version of Git.

But first, as seen in this answer, check the value of the environment variable GIT_SEQUENCE_EDITOR.
If set to ':', that would make the editor step invisible.

Note: setting the sequence.editor configuration should not have been necessary:

When not configured the default commit message editor is used instead.

So make sure instead that core.editor is set properly, as illustrated in "Associating text editors with Git".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Is your method different with setting `sequence.editor`? – user3595632 Feb 16 '18 at 07:48
  • @user3595632 it is more general and will work for all instances where an editor is needed. Again, in your case, "**when [sequence.editor] is not configured, the default commit message editor is used instead**". – VonC Feb 16 '18 at 07:50
  • Ok, I will select yours as an solution. Thanks : ) – user3595632 Feb 16 '18 at 07:57
2

git config --global sequence.editor vim would work :)

user3595632
  • 5,380
  • 10
  • 55
  • 111