Skip to content

Commit 3917593

Browse files
committed
Teach 'git pull' to handle --rebase=interactive
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent abf3368 commit 3917593

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
@@ -101,7 +101,7 @@ Options related to merging
101101
include::merge-options.txt[]
102102

103103
-r::
104-
--rebase[=false|true|preserve]::
104+
--rebase[=false|true|preserve|interactive]::
105105
When true, rebase the current branch on top of the upstream
106106
branch after fetching. If there is a remote-tracking branch
107107
corresponding to the upstream branch and the upstream branch
@@ -113,6 +113,8 @@ to `git rebase` so that locally created merge commits will not be flattened.
113113
+
114114
When false, merge the current branch into the upstream branch.
115115
+
116+
When `interactive`, enable the interactive mode of rebase.
117+
+
116118
See `pull.rebase`, `branch.<name>.rebase` and `branch.autoSetupRebase` in
117119
linkgit:git-config[1] if you want to make `git pull` always use
118120
`--rebase` instead of merging.

contrib/examples/git-pull.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ do
159159
;;
160160
--no-rebase)
161161
rebase=false
162+
162163
;;
163164
--recurse-submodules)
164165
recurse_submodules=--recurse-submodules
@@ -224,14 +225,18 @@ do
224225
done
225226

226227
case "$rebase" in
228+
i|interactive)
229+
rebase=true
230+
rebase_args=-i
231+
;;
227232
preserve)
228233
rebase=true
229234
rebase_args=--preserve-merges
230235
;;
231236
true|false|'')
232237
;;
233238
*)
234-
echo "Invalid value for --rebase, should be true, false, or preserve"
239+
echo "Invalid value for --rebase, should be true, false, interactive or preserve"
235240
usage
236241
exit 1
237242
;;

0 commit comments

Comments
 (0)