如何摆脱"GIT STATUS"上的消息奇怪消息?

use*_*333 22 git

突然出现了:

MacBook-Pro: $ git status
On branch dev
Your branch is up-to-date with 'dropbox/dev'.
You are currently editing a commit while rebasing branch 'Releases' on '72ca998'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

分店没有变化.一切都是最新的.

And*_*ing 42

git rebase --abort应该中止rebase操作并返回到先前的状态.但是可以肯定的是,你之前输入了什么命令?

编辑:输出git reflog可以显示rebase开始的位置,它看起来像

7d0b010 HEAD@{0}: rebase finished: returning to refs/heads/bran
7d0b010 HEAD@{1}: rebase: adding file in branch
a7e6693 HEAD@{2}: rebase: checkout master
a7e6693 HEAD@{3}: commit: adding file in master
4c00dd7 HEAD@{4}: checkout: moving from bran to master
3cb192a HEAD@{5}: commit: adding file in branch
Run Code Online (Sandbox Code Playgroud)


Dav*_*ara 20

如果您最终处于这种状态但需要保留更改:

  1. 为当前分支创建一个备份分支:git branch my-backup
  2. 在当前分支上中止变基:git rebase --abort
  3. 合并步骤 1 中创建的备份分支的更改:git merge my-backup


use*_*180 11

git rebase --quit 如果失败尝试使用 git rebase --abort

git rebase --quit完全放弃更改。