Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC PATCH] Make the rebase edit mode really end up in an edit state

From: Anders Melchiorsen <hidden>
Date: 2016-06-15 22:45:58

Björn Steinbrink [off-list ref] writes:
No, you don't have to do that. As long as you only want to "edit"
the commit you marked as "edit", you only need to use "git add" and
"git rebase --continue". rebase -i checks whether HEAD still
resolves to the same commit and if so, it automatically does the
soft reset for you.

Maybe we should just advertise that in the message provided by
rebase after it stops? I'm afraid I can't come up with a sane
wording though, as there are still cases when you need to commit
yourself, eg. when you use reset. And getting that into one simple
sentence seems a bit hard (for me).
I was happy to learn that trick when looking at the source, so I agree
that it is a good idea to advertise it. You are right that it is hard
to describe well in few words, though. Does somebody feel like
repainting this?

--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -336,14 +336,13 @@ do_next () {
 		make_patch $sha1
 		git rev-parse --verify HEAD > "$DOTEST"/amend
 		warn "Stopped at $sha1... $rest"
-		warn "You can amend the commit now, with"
-		warn
-		warn "	git commit --amend"
-		warn
-		warn "Once you are satisfied with your changes, run"
+		warn "You can amend the commit now, by marking"
+		warn "paths with 'git add <paths>' and running"
 		warn
 		warn "	git rebase --continue"
 		warn
+		warn "If you want to create new commits, run"
+		warn "'git commit' yourself before continuing."
 		exit 0
 		;;
 	squash|s)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help