Skip to content

Instantly share code, notes, and snippets.

@sethdavis512
Last active January 2, 2024 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sethdavis512/d17f08a40a7f8896da9e6c76ef80d57e to your computer and use it in GitHub Desktop.
Save sethdavis512/d17f08a40a7f8896da9e6c76ef80d57e to your computer and use it in GitHub Desktop.
# Aliases
# Commit handlers
alias ga="git commit --amend"
alias gam="git add . && git commit --amend"
alias gamp="gam && gpf"
alias gp="git push -u origin $(git symbolic-ref --short HEAD)"
alias gpu="git pull"
alias gr="git reset HEAD^"
alias gt="git add . && git commit -m \"TEMP\" --no-verify"
alias gpa="!f() { git add . && git commit -m ${1} && git push -u origin $(git symbolic-ref --short HEAD) }; f"
# Branch handlers
alias gb="git branch"
alias gcp="git checkout primary && git pull"
alias gl="git log"
alias gs="git status"
alias gpf="git push --force-with-lease"
alias gco="!f() { git checkout jira/sethdavis/${1} }; f"
alias gcn="!f() { git checkout primary && git pull && git checkout -b jira/sethdavis/${1} }; f"
alias gcnn="!f() { git checkout primary && git pull && git checkout -b nobug/sethdavis/${1} }; f"
# Update handlers
alias grc="git rebase --continue"
alias grm="git fetch --all && git rebase origin/master"
alias grp="git fetch --all && git rebase origin/primary"
# Module handlers
alias scrub="rm -rf node_modules && rm package-lock.json && nvm use && npm i"
# Unit test handlers
alias nt="npm t -- --watch --no-coverage"
# Project handlers
alias new-remix="npx create-remix@latest"
alias new-remix-indie="npx create-remix@latest --template remix-run/indie-stack"
# Path handlers
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
# Git handlers
alias commitsByAuthor="git shortlog -sn --all"
# npm handlers
alias ns="npm start"
alias lb="npm run lint:fix && npm run build"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment