Mac Setup
Bash Workflow Shortcuts

Bash Workflow Shortcuts

Bash scripts I use to make my life easier.

Vercel Deploy

Open Vercel deploy page with the current git repo as the source.
REMOTE=`git remote show -n origin | grep Push | cut -d: -f2- | rev | cut -c 5- | rev `
CLEAN_LINK=`echo $LINK | sed 's/ //g'`
# If there is remote, else echo
if [ -n "$REMOTE" ]; then
    open $CLEAN_LINK
    echo "No remote found"

Checkout Main and Delete

Checkout to the main branch and delete the previous branch.
# Checkout to main branch
# Then delete the branch
branch=$(git branch | grep \* | cut -d ' ' -f2)
git checkout main
git pull
if [ $branch != "main" ]; then
    git branch -D $branch
# add to zsh
# alias gcmr="bash /Users/Clarence/flow/"

Git Emergency

Save your current changes and push them to a remote branch.

Code in GitHub (opens in a new tab)

Last updated on November 14, 2023