forked from ToolJet/ToolJet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
148 lines (135 loc) · 6.86 KB
/
.gitconfig
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[alias]
# This command does a checkout and pull the changes.
checkout-all = "!f() { \
git checkout \"$1\" && git pull; \
git submodule foreach --recursive \" \
if git show-ref --verify --quiet refs/heads/$1; then \
git checkout $1 && git pull; \
else \
echo 'Skipping submodule $(basename $PWD), branch $1 not found.'; \
fi\"; \
}; f"
# This command helps to pull changes for the base and submodule repos.
pull-all = "!f() { \
git pull && \
git submodule foreach 'git pull'; \
}; f"
# This command helps to stage the changes for the base and submodule repos.
add-all = "!f() { \
git add -A && \
git submodule foreach 'git add -A'; \
}; f"
# This command creates custom and pushes a new branch in the base and submodule repos.
create-branch-all = "!f() { \
branch_name=$1; \
if [ -z \"$branch_name\" ]; then \
echo \"Branch name required! Usage: git create-branch-all <branch_name>\"; \
return 1; \
fi; \
echo \"Creating new branch $branch_name in the base repo...\"; \
git checkout -b $branch_name && git push -u origin $branch_name; \
echo \"Creating new branch $branch_name in submodules...\"; \
git submodule foreach --quiet --recursive \"git checkout -b $branch_name && git push -u origin $branch_name\"; \
}; f"
# This command creates and pushes a new branch with the 'feature/' prefix in the base and submodule repos.
create-feature-all = "!f() { \
branch_name=$1; \
if [ -z \"$branch_name\" ]; then \
echo \"Feature name required! Usage: git create-feature-all <feature_name>\"; \
return 1; \
fi; \
feature_branch=\"feature/$branch_name\"; \
echo \"Creating new feature branch $feature_branch in the base repo...\"; \
git checkout -b $feature_branch && git push -u origin $feature_branch; \
echo \"Creating new feature branch $feature_branch in submodules...\"; \
git submodule foreach --quiet --recursive \"git checkout -b $feature_branch && git push -u origin $feature_branch\"; \
}; f"
# This command creates and pushes a new branch with the 'hot-fix/' prefix in the base and submodule repos.
create-hotfix-all = "!f() { \
branch_name=$1; \
if [ -z \"$branch_name\" ]; then \
echo \"Hotfix name required! Usage: git create-hotfix-all <hotfix_name>\"; \
return 1; \
fi; \
hotfix_branch=\"hot-fix/$branch_name\"; \
echo \"Creating new hotfix branch $hotfix_branch in the base repo...\"; \
git checkout -b $hotfix_branch && git push -u origin $hotfix_branch; \
echo \"Creating new hotfix branch $hotfix_branch in submodules...\"; \
git submodule foreach --quiet --recursive \"git checkout -b $hotfix_branch && git push -u origin $hotfix_branch\"; \
}; f"
# This command creates and pushes a new branch with the 'release/' prefix in the base and submodule repos.
create-release-all = "!f() { \
branch_name=$1; \
if [ -z \"$branch_name\" ]; then \
echo \"Release name required! Usage: git create-release-all <release_name>\"; \
return 1; \
fi; \
release_branch=\"release/$branch_name\"; \
echo \"Creating new release branch $release_branch in the base repo...\"; \
git checkout -b $release_branch && git push -u origin $release_branch; \
echo \"Creating new release branch $release_branch in submodules...\"; \
git submodule foreach --quiet --recursive \"git checkout -b $release_branch && git push -u origin $release_branch\"; \
}; f"
# This command creates and pushes a new branch with the 'revamp/' prefix in the base and submodule repos.
create-revamp-all = "!f() { \
branch_name=$1; \
if [ -z \"$branch_name\" ]; then \
echo \"Revamp name required! Usage: git create-revamp-all <revamp_name>\"; \
return 1; \
fi; \
revamp_branch=\"revamp/$branch_name\"; \
echo \"Creating new revamp branch $revamp_branch in the base repo...\"; \
git checkout -b $revamp_branch && git push -u origin $revamp_branch; \
echo \"Creating new revamp branch $revamp_branch in submodules...\"; \
git submodule foreach --quiet --recursive \"git checkout -b $revamp_branch && git push -u origin $revamp_branch\"; \
}; f"
# This command creates and pushes a new branch with the 'sprint/' prefix in the base and submodule repos.
create-sprint-all = "!f() { \
branch_name=$1; \
if [ -z \"$branch_name\" ]; then \
echo \"Sprint name required! Usage: git create-sprint-all <sprint_name>\"; \
return 1; \
fi; \
sprint_branch=\"sprint/$branch_name\"; \
echo \"Creating new sprint branch $sprint_branch in the base repo...\"; \
git checkout -b $sprint_branch && git push -u origin $sprint_branch; \
echo \"Creating new sprint branch $sprint_branch in submodules...\"; \
git submodule foreach --quiet --recursive \"git checkout -b $sprint_branch && git push -u origin $sprint_branch\"; \
}; f"
# This command creates and pushes a new tag in the base and submodule repos.
create-tag-all = "!f() { \
tag_name=$1; \
if [ -z \"$tag_name\" ]; then \
echo \"Tag name required! Usage: git create-tag-all <tag_name>\"; \
return 1; \
fi; \
echo \"Creating and pushing tag $tag_name in the base repo...\"; \
git tag $tag_name && git push origin $tag_name; \
echo \"Creating and pushing tag $tag_name in submodules...\"; \
git submodule foreach --quiet --recursive \"git tag $tag_name && git push origin $tag_name\"; \
}; f"
# This command stages and commits changes for the base and submodule repos.
commit-all = "!f() { \
commit_message=\"$1\"; \
if [ -z \"$commit_message\" ]; then \
echo \"Commit message required! Usage: git commit-all <commit_message>\"; \
return 1; \
fi; \
echo \"Committing changes in the base repo...\"; \
git commit -m \"$commit_message\"; \
echo \"Committing changes in submodules...\"; \
git submodule foreach --quiet --recursive \"git commit -m '$commit_message'\"; \
}; f"
# This command pushes commits for the base and submodule repos.
push-all = "!f() { \
echo \"Pushing changes in the base repo...\"; \
git push; \
echo \"Pushing changes in submodules...\"; \
git submodule foreach --quiet --recursive \"git push\"; \
}; f"
status-all = "!f() { \
echo \"Status of base repo...\"; \
git status; \
echo \"Status of submodules...\"; \
git submodule foreach --quiet --recursive \"git status\"; \
}; f"