diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 069f502..dcd0606 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -881,6 +881,24 @@ alias_sudo: | # Allows for alias expansions when using sudo, such as doing "sudo ll". alias sudo="sudo " + function_load_branch: | + # Change a branch to point at another. + function load-branch { + rcvr="$1" # branch which we want to modify + base="$2" # branch with the changes we want + if [[ "$1" == main ]]; + echo "Are you nuts, fool!? Not main! Do it manually!" + exit 1 + fi + git switch "$base" + git branch -f "$rcvr" "$base" + #git switch "$rcvr" + git push --force --set-upstream origin "$rcvr" + git switch "$base" + git branch + } + alias load-prod="load-branch prod dev" + alias load-stage="load-branch stage dev" - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -956,6 +974,7 @@ {{ function_debian_upgrade }} {{ function_ebook_convert }} {{ alias_sudo }} + {{ function_load_branch }} - name: General | Account Management | Users | Files | .bashrc blockinfile: