Skip to content

Instantly share code, notes, and snippets.

@MushuLeDragon
Last active September 20, 2024 05:38
Show Gist options
  • Save MushuLeDragon/0d077949fc4f91b6b1e79690a64049ca to your computer and use it in GitHub Desktop.
Save MushuLeDragon/0d077949fc4f91b6b1e79690a64049ca to your computer and use it in GitHub Desktop.
Create aliases. First, enable .bash_aliases file in .bashrc. See https://doc.ubuntu-fr.org/alias
# sudo nano ~/.bash_aliases
# sudo nano ~./bashrc
# source ~/.bashrc
# For macOs
# nano ~/.bash_profile
# source ~/.zshrc
# source ~/.bashrc
# Aliases
## Divers
alias cls=clear
alias ll='ls -la'
## Symfony
alias sc='symfony console'
## Docker
alias dc='docker compose'
alias dcb='dc build'
alias dcbnc='dcb --no-cache'
alias dcd='dc down'
alias dcp='dc ps'
alias dcrm='dc rm'
alias dcrs='dc restart'
alias dcu='dc up -d'
## Make
alias mp='make php'
## Git
alias ga='git add'
alias gb='git branch'
alias gck='git checkout'
alias gcm='git commit -m'
alias gd='git diff'
alias gfe='git fetch'
alias gm='git merge'
alias gph='git push'
alias gpl='git pull'
alias grb='git rebase'
alias grbc='grb --continue'
alias grm='git remote -v'
alias gs='git status'
alias gst='git stash'
alias gstp='gst pop'
alias gv='git --version'
## Git Flow
alias gflow='git flow'
alias gfi='gflow init'
alias gffs='gflow feature start'
alias gfff='gflow feature finish'
alias gfrs='gflow release start'
alias gfrf='gflow release finish'
alias gfhs='gflow hotfix start'
alias gfhf='gflow hotfix finish'
## NPM
alias nr='npm run'
alias nrw='nr watch'
alias nrd='nr dev'
alias nrb='nr build'
export PATH="/usr/local/opt/php/bin:$PATH"
# Aliases
doskey /m # Liste toutes les commandes enregistrées
doskey /h # Aide
# F7 : affiche l'historique de l'invite
# F8 : effectue une recherche dans l'historique
# F9 : lance un élément de l'historique à travers son numéro
# ALT+F7 : efface l'historique de l'invite
# ALT+F10 : efface les macros
## Divers
doskey cls=clear
doskey ll=ls -la
## Symfony
doskey sc=symfony console
## Docker
doskey dc=docker compose
doskey dcb=docker compose build
doskey dcbnc=docker composeb --no-cache
doskey dcd=docker compose down
doskey dcp=docker compose ps
doskey dcrm=docker compose rm
doskey dcrs=docker compose restart
doskey dcu=docker compose up -d
## Make
doskey mp=make php
## Git
doskey ga=git add
doskey gb=git branch
doskey gck=git checkout
doskey gcm=git commit -m
doskey gd=git diff
doskey gfe=git fetch
doskey gm=git merge
doskey gph=git push
doskey gpl=git pull
doskey grb=git rebase
doskey grbc=git rebase --continue
doskey grm=git remote -v
doskey gs=git status
doskey gst=git stash
doskey gstp=git stash pop
doskey gv=git --version
## Git Flow
doskey gflow=git flow
doskey gfi=gflow init
doskey gffs=gflow feature start
doskey gfff=gflow feature finish
doskey gfrs=gflow release start
doskey gfrf=gflow release finish
doskey gfhs=gflow hotfix start
doskey gfhf=gflow hotfix finish
## NPM
doskey nr=npm run
doskey nrw=npm run watch
doskey nrd=npm run dev
doskey nrb=npm run build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment