File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 5
5
usage () {
6
6
blue " Usage"
7
7
cat << -USAGE
8
- $0 [--stash ] [repo[/branch]]
8
+ $0 [options ] [repo[/branch]]
9
9
Fetch, rebase, and push.
10
- --stash
11
- Saves the current status in stash before syncing, and pops afterwards.
10
+
12
11
repo/branch
13
12
Specifies where to fetch from, pull to, and what to merge with.
13
+
14
+ options
15
+ --stash
16
+ Saves the current status in stash before syncing, and pops afterwards.
17
+
18
+ --rebase
19
+ Uses pull --rebase instead of merge
20
+
14
21
USAGE
15
22
exit 1
16
23
}
50
57
assert_clear_status " To stash before and after syncing, call git sync --stash"
51
58
fi
52
59
60
+ branch=" ${branch/* \/ / } "
61
+
53
62
green Pulling $source $rebase
54
- git pull $rebase " $source " " ${ branch/* \/ / } " || exit 1
63
+ git pull $rebase " $source " " $branch " || exit 1
55
64
assert_clear_status
56
65
57
66
green Pushing
58
- git push " $source "
67
+ git push " $source " HEAD: " $branch "
59
68
assert_clear_status
60
69
61
70
if $stash ; then
You can’t perform that action at this time.
0 commit comments