Skip to content

Instantly share code, notes, and snippets.

@sunil-bagde
Last active April 5, 2024 14:01
Show Gist options
  • Save sunil-bagde/819075b945cbd4491726db8798a672fe to your computer and use it in GitHub Desktop.
Save sunil-bagde/819075b945cbd4491726db8798a672fe to your computer and use it in GitHub Desktop.
Aliases
# aliases
alias c="clear"
export NODE_ENV=local
alias dnpm='docker-compose up -d scripts && docker-compose exec scripts npm
run ts:build && docker-compose exec scripts npm '
#export NODE_PATH=$(npm root -g)
# Git
function current_branch() {
ref=$(git branch --show-current 2> /dev/null) || return
echo ${ref}
}
alias ga="git add -A"
alias gc="git commit -m"
alias gb="git branch"
alias lg="git log"
alias gs="git status"
alias stash="git stash"
alias hard="git reset --hard && git clean -dffx"
#alias nah ="git reset --hard"
# git push
#alias push="git push --force origin $(current_branch)"
# git pull
#alias pull="git pull origin $(current_branch)"
push() {
#name=${1:'sunil'}
git push origin "$(current_branch)"
}
# git pull
pull() {
#name=${1:'sunil'}
git pull origin "$(current_branch)"
}
# git fetch
fetch() {
#name=${1:'sunil'}
git fetch origin "$@"
}
l='ls -lah'
la='ls -lAh'
lg='git log'
ll='ls -lh'
ls='ls -G'
lsa='ls -lah'
md='mkdir -p'
rd=rmdir
stash='git stash'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment