Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 8daee96

Browse files
dschokasal
authored andcommitted
Teach 'git pull' to handle --rebase=interactive
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ec765f6 commit 8daee96

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Documentation/git-pull.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Options related to merging
104104
include::merge-options.txt[]
105105

106106
-r::
107-
--rebase[=false|true|preserve]::
107+
--rebase[=false|true|preserve|interactive]::
108108
When true, rebase the current branch on top of the upstream
109109
branch after fetching. If there is a remote-tracking branch
110110
corresponding to the upstream branch and the upstream branch
@@ -117,6 +117,8 @@ locally created merge commits will not be flattened.
117117
+
118118
When false, merge the current branch into the upstream branch.
119119
+
120+
When `interactive`, enable the interactive mode of rebase.
121+
+
120122
See `pull.rebase`, `branch.<name>.rebase` and `branch.autosetuprebase` in
121123
linkgit:git-config[1] if you want to make `git pull` always use
122124
`--rebase` instead of merging.

git-pull.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ do
137137
;;
138138
--no-r|--no-re|--no-reb|--no-reba|--no-rebas|--no-rebase)
139139
rebase=false
140+
140141
;;
141142
--recurse-submodules)
142143
recurse_submodules=--recurse-submodules
@@ -177,14 +178,18 @@ do
177178
done
178179

179180
case "$rebase" in
181+
i|interactive)
182+
rebase=true
183+
rebase_args=-i
184+
;;
180185
preserve)
181186
rebase=true
182187
rebase_args=--preserve-merges
183188
;;
184189
true|false|'')
185190
;;
186191
*)
187-
echo "Invalid value for --rebase, should be true, false, or preserve"
192+
echo "Invalid value for --rebase, should be true, false, interactive or preserve"
188193
usage
189194
exit 1
190195
;;

0 commit comments

Comments
 (0)