Last active
January 26, 2021 15:44
-
-
Save trueheart78/2ffabced0e0cdc91144b12b528de378f to your computer and use it in GitHub Desktop.
Revisions
-
trueheart78 revised this gist
Jan 26, 2021 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,18 @@ g () { done elif [[ $1 = "push" ]]; then branch=`command git rev-parse --abbrev-ref HEAD` if [[ $branch = 'main' ]] then while true; do echo -n "Push to 🔥 Main 🔥 ? (y/n) " read yn case $yn in [Yy]* ) command git "$@"; break;; [Nn]* ) echo "❤️ Push-to-Main crisis averted ❤️"; break;; * ) echo "Please answer yes or no.";; esac done elif [[ $branch = 'master' ]] then while true; do echo -n "Push to 🔥 Master 🔥 ? (y/n) " -
trueheart78 revised this gist
Mar 28, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,6 +34,8 @@ g () { * ) echo "Please answer yes or no.";; esac done else command git "$@" fi else command git "$@" -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,8 @@ g () { esac done fi else command git "$@" fi else command git status -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ git () { # as it will override this command g () { if [[ $# -gt 0 ]] then if [[ `uname` = 'Darwin' && $1 = "init" ]]; then command git "$@" # prompt for the username and email to use while true; do echo -n "Will this be a ⚠️ work-related ⚠️ repo? (y/n) " -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 11 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,15 +25,15 @@ g () { branch=`command git rev-parse --abbrev-ref HEAD` if [[ $branch = 'master' ]] then while true; do echo -n "Push to 🔥 Master 🔥 ? (y/n) " read yn case $yn in [Yy]* ) command git "$@"; break;; [Nn]* ) echo "❤️ Push-to-Master crisis averted ❤️"; break;; * ) echo "Please answer yes or no.";; esac done fi fi else @@ -44,11 +44,11 @@ g () { # git local repo user git_personal () { command git config user.name "Your Name" command git config user.email "you@personal-domain.com" } # git work repo user git_work () { command git config user.name "Your Professional Name" command git config user.email "you@work-domain.com" } -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 25 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,16 +10,31 @@ g () { if [[ $# -gt 0 ]] then command git "$@" if [[ `uname` = 'Darwin' && $1 = "init" ]]; then # prompt for the username and email to use while true; do echo -n "Will this be a ⚠️ work-related ⚠️ repo? (y/n) " read yn case $yn in [Yy]* ) git_work; break;; [Nn]* ) git_personal; break;; * ) echo "Please answer yes or no.";; esac done elif [[ $1 = "push" ]]; then branch=`command git rev-parse --abbrev-ref HEAD` if [[ $branch = 'master' ]] then while true; do echo -n "Push to 🔥 Master 🔥 ? (y/n) " read yn case $yn in [Yy]* ) command git "$@"; break;; [Nn]* ) echo "❤️ Push-to-Master crisis averted ❤️"; break;; * ) echo "Please answer yes or no.";; esac done fi fi else command git status @@ -28,12 +43,12 @@ g () { # git local repo user git_personal () { command git config user.name "Your Name" command git config user.email "you@personal.com" } # git work repo user git_work () { command git config user.name "Your Name" command git config user.email "you@work.com" } -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,15 @@ # remap git to point to g() git () { g "$@" } # git super command # make sure with zsh that the git plugin is not used # as it will override this command g () { if [[ $# -gt 0 ]] then command git "$@" if [[ `uname` = 'Darwin' && $1 = "init" ]] then # prompt for the username and email to use @@ -17,7 +22,7 @@ g () { done fi else command git status fi } -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,10 +8,10 @@ g () { if [[ `uname` = 'Darwin' && $1 = "init" ]] then # prompt for the username and email to use echo "Will this be a work-related repo?" select yn in "Yes" "No"; do case $yn in Yes ) git_work; break;; No ) git_personal; break;; esac done -
trueheart78 revised this gist
Mar 26, 2018 . 1 changed file with 7 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,14 +23,12 @@ g () { # git local repo user git_personal () { git config user.name "Your Name" git config user.email "you@yourdomain.com" } # git work repo user git_work () { git config user.name "Your Name" git config user.email "[email protected]" } -
trueheart78 created this gist
Mar 26, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ # git super command # make sure with zsh that the git plugin is not used # as it will override this command g () { if [[ $# -gt 0 ]] then git "$@" if [[ `uname` = 'Darwin' && $1 = "init" ]] then # prompt for the username and email to use echo "Will this be a CMM repo?" select yn in "Yes" "No"; do case $yn in Yes ) git_cmm; break;; No ) git_personal; break;; esac done fi else git status fi } # git local repo user git_personal () { git config user.name "Josh Mills" git config user.email "[email protected]" } alias git_th78="git_personal" # git cmm repo git_cmm () { git config user.name "Josh Mills" git config user.email "[email protected]" } alias git_th78="git_work"