Nó nói:
When you save and exit the editor, it will rewind you back to that last commit in that list and drop you on the command line with the following message:
$ git rebase -i HEAD~3
Stopped at 7482e0d... updated the gemspec to hopefully work better
You can amend the commit now, with
Nó không có nghĩa là:
type again git rebase -i HEAD~3
Cố gắng không gõ git rebase -i HEAD~3
khi thoát khỏi trình biên tập, và nó sẽ hoạt động tốt.
(nếu không, trong tình huống cụ thể của bạn, một git rebase -i --abort
thể là cần thiết để thiết lập lại tất cả mọi thứ và cho phép bạn thử lại)
Như Dave Vogt đề cập trong các ý kiến, git rebase --continue
là cho đi với nhiệm vụ tiếp theo trong rebasing quy trình, sau khi bạn đã sửa đổi cam kết đầu tiên.
Ngoài ra, Gregg Lind đề cập trong his answer lệnh reword
của git rebase
:
By replacing the command "pick" with the command "edit", you can tell git rebase
to stop after applying that commit, so that you can edit the files and/or the commit message, amend the commit, and continue rebasing.
If you just want to edit the commit message for a commit, replace the command " pick
" with the command " reword
", since Git1.6.6 (January 2010) .
It does the same thing ‘ edit
’ does during an interactive rebase, except it only lets you edit the commit message without returning control to the shell. This is extremely useful.
Currently if you want to clean up your commit messages you have to:
$ git rebase -i next
Then set all the commits to ‘edit’. Then on each one:
# Change the message in your editor.
$ git commit --amend
$ git rebase --continue
Using ‘ reword
’ instead of ‘ edit
’ lets you skip the git-commit
and git-rebase
calls.
Làm việc với lệnh --abort. Cảm ơn –
Ngoài ra, 'git rebase --continue' sẽ chuyển sang tác vụ tiếp theo trong quá trình rebasing, sau khi bạn đã sửa đổi cam kết đầu tiên. –
Thêm [link] (https://help.github.com/articles/changing-a-commit-message/) vào bài viết wiki github để thay đổi thông báo cam kết – Joy