Git interactive rebase without opening the editor -
git allows commands create or modify commits without opening editor first, example:
git commit --amend --no-edit git commit --fixup=head^ i have set rebase.autosquash true, todo list interactive rebase automatically reordered. there way perform rebase, without opening editor first, like:
git rebase -i --no-edit head~3
tl;dr answer: git_sequence_editor=: git rebase -i head~3
you can't stop git rebase --interactive running "sequence editor" (that's edit command on "sequence file" containing various pick, etc., commands). however, if examine interactive rebase script:
$ vim $(git --exec-path)/git-rebase--interactive you'll find code near line 230 or so:
git_sequence_editor () { if test -z "$git_sequence_editor" git_sequence_editor="$(git config sequence.editor)" if [ -z "$git_sequence_editor" ] git_sequence_editor="$(git var git_editor)" || return $? fi fi eval "$git_sequence_editor" '"$@"' } thus, need set sequence editor "edit" command nothing , succeeds, such shell's built-in : command, or true command.
(any of $git_sequence_editor, configured sequence.editor, or $git_editor suffice this, though obvious best 1 use first.)
Comments
Post a Comment