How to know if there is a git rebase in progress?

后端 未结 7 515
说谎
说谎 2020-12-02 18:02

When I start a git rebase -i, I can issue commands like git rebase --continue, or git rebase --abort. Those commands only work if a re

7条回答
  •  温柔的废话
    2020-12-02 18:40

    If there’s an interactive rebase in progress, this will tell you where you are in the process:

    $ cat .git/rebase-merge/done 
    pick 786139e lrg
    edit 668b8a6 ktio
    $ 
    

    Right now I’m editing the “ktio” patch in an interactive rebase.

    If there’s no rebase going on, it will look like this:

    $ cat .git/rebase-merge/done 
    cat: .git/rebase-merge/done: No such file or directory
    $ 
    

提交回复
热议问题