Skip to contentSkip to conversation

git rebase : knowing where I am...

DISCUSSION Jeremy Rosen 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hello

is there some way to know how far you are within a rebase when the rebase is interupted by a conflict other than the message given by git rebase when it was interrupted ?

I would have expected a git rebase --status or something similar...

Regards

Jérémy Rosen

fight key loggers : write some perl using vim

#1 lore raw
Quoted 3 lines · Jeremy Rosen

is there some way to know how far you are within a rebase when the rebase is interupted by a conflict other than the message given by git rebase when it was interrupted ?

I do not think there is a "git $anything" command to do that, but in the meantime you could "cat .git/rebase-*/git-rebase-todo" or something.

Recent trend is to teach "git status" more about these internal states, so with time the command may learn to include this in its output.

#2 lore raw
Quoted 6 lines · Junio C Hamano
Quoted 3 lines · Jeremy Rosen

is there some way to know how far you are within a rebase when the rebase is interupted by a conflict other than the message given by git rebase when it was interrupted ?

Quoted 6 lines

I do not think there is a "git $anything" command to do that, but in the meantime you could "cat .git/rebase-*/git-rebase-todo" or something.

Recent trend is to teach "git status" more about these internal states, so with time the command may learn to include this in its output.

I actually often do this myself, not "cat anything" as I mentioned above:

git show-branch $branch_I_am_rebasing HEAD

#3 lore raw
In reply to Jeremy Rosen
Quoted 1 line · Jeremy Rosen

is there some way to know how far you are within a rebase when the rebase is interupted by a conflict other than the message given by git rebase when it was interrupted ?

How about

  $ cat .git/rebase-merge/done

sample output:

p 3b465bd foo2 1
e 03f8bea foo2 2
e 0871817 foo2 1

last line is the current commit being edited/under conflict/etc.

--
Cheers,
Ray Chuan