File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ usage() {
4747 echo " git flow hotfix start [-F] <version> [<base>]"
4848 echo " git flow hotfix finish [-Fsumpk] <version>"
4949 echo " git flow hotfix publish <version>"
50+ echo " git flow hotfix track <version>"
5051}
5152
5253cmd_default() {
@@ -216,6 +217,26 @@ cmd_publish() {
216217 echo
217218}
218219
220+ cmd_track() {
221+ parse_args "$@"
222+ require_version_arg
223+
224+ # sanity checks
225+ require_clean_working_tree
226+ require_branch_absent "$BRANCH"
227+ git fetch -q "$ORIGIN"
228+ require_branch "$ORIGIN/$BRANCH"
229+
230+ # create tracking branch
231+ git checkout -b "$BRANCH" "$ORIGIN/$BRANCH"
232+
233+ echo
234+ echo "Summary of actions:"
235+ echo "- A new remote tracking branch '$BRANCH' was created"
236+ echo "- You are now on branch '$BRANCH'"
237+ echo
238+ }
239+
219240cmd_finish() {
220241 DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
221242 DEFINE_boolean sign false "sign the release tag cryptographically" s
You can’t perform that action at this time.
0 commit comments