We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9e2d405 + aa4531d commit d38a6aeCopy full SHA for d38a6ae
bin/git-upstream-sync
@@ -12,13 +12,14 @@
12
13
branch_name=$(git symbolic-ref --short -q HEAD)
14
upstream_remote=$(git config --get upstream-sync.remote)
15
+
16
# shellcheck disable=SC2181
17
if [[ $? != 0 ]]; then
- echo 'Using default remote of upstream'
18
- upstream_remote='upstream'
+ if [[ -n "$upstream_remote" ]]; then
19
+ upstream_remote=$(git remote show | head -1)
20
+ fi
21
fi
22
-git fetch "${upstream_remote}" && \
23
+git fetch "${upstream_remote}" -p && \
24
git rebase "${upstream_remote}/${branch_name}" && \
- git push && \
- git fetch -p
25
+ git push
0 commit comments