forked from nvie/gitflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-flow-develop
More file actions
38 lines (28 loc) · 774 Bytes
/
Copy pathgit-flow-develop
File metadata and controls
38 lines (28 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
cmd_merge() {
cmd_merge_to_master
}
cmd_merge_to_master() {
if has "$ORIGIN/$DEVELOP_BRANCH" $(git_remote_branches); then
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
fi
git_do checkout "$MASTER_BRANCH"
echo "fetching master"
git_do pull "$ORIGIN" "$MASTER_BRANCH"
echo "merging develop"
git_do merge "$ORIGIN" "$DEVELOP_BRANCH"
echo "committing"
git_do commit -n
echo "pushing to master"
git_do push "$ORIGIN" "$MASTER_BRANCH"
git_do checkout "$DEVELOP_BRANCH"
git_do fetch -q "$ORIGIN" "$MASTER_BRANCH"
git_do merge "$ORIGIN" "$MASTER_BRANCH"
git_do push "$ORIGIN" "$DEVELOP_BRANCH"
}
init() {
require_git_repo
gitflow_has_develop_configured
require_gitflow_initialized
gitflow_load_settings
}