summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/git-new-workdir4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/git-new-workdir b/bin/git-new-workdir
index 3ad2c0cea563..137ea082b4ec 100755
--- a/bin/git-new-workdir
+++ b/bin/git-new-workdir
@@ -80,3 +80,7 @@ cp "$git_dir/HEAD" .git/HEAD
# checkout the branch (either the same as HEAD from the original repository, or
# the one that was asked for)
git checkout -f $branch
+if test -n "$branch"
+then
+ git merge --ff-only '@{upstream}'
+fi