Skip to content

Instantly share code, notes, and snippets.

@armandolazarte
Last active March 5, 2025 13:19
Show Gist options
  • Save armandolazarte/73899c8bc66b2bea208121fac03efca8 to your computer and use it in GitHub Desktop.
Save armandolazarte/73899c8bc66b2bea208121fac03efca8 to your computer and use it in GitHub Desktop.
Alias para el bash de git
alias php="php.bat"
alias herd="herd.bat"
alias laravel="laravel.bat"
alias composer="composer.bat"
# Laravel aliases
alias art="php artisan"
alias artisan="php artisan"
alias tinker="php artisan tinker"
#make:class
alias mcl="php artisan make:class"
#make:controller
alias mc="php artisan make:controller"
alias mcr="php artisan make:controller --resource "
#make:livewire
alias ml="php artisan make:livewire"
#make:migration
alias mmi="php artisan make:migration"
#make:model
alias mm="php artisan make:model"
alias mmm="php artisan make:model --migration"
alias mma="php artisan make:model --all"
#make:observer
alias mo="php artisan make:observer"
#make:request
alias mre="php artisan make:request"
#make:resource
#make:seeder
#make:test
alias mt="php artisan make:test"
alias mtu="php artisan make:test --unit "
#make:trait
#make:view
alias migrate="php artisan migrate"
alias mf="php artisan migrate:fresh"
alias mfs="php artisan migrate:fresh --seed"
alias mr="php artisan migrate:rollback"
alias key="php artisan key:generate"
alias serve="php artisan serve"
alias t="php artisan test"
alias tf="php artisan test --filter "
alias pu="vendor/bin/phpunit"
alias puf="vendor/bin/phpunit --filter "
alias cdo="composer dump-autoload -o"
alias ci="composer install"
alias co="composer outdated"
alias cu="composer update"
# Git aliases
alias gs='git status -sb'
alias gcc='git checkout'
alias gcm='git checkout master'
alias gaa='git add --all'
alias gc='git commit -m $2'
alias push='git push'
alias gpo='git push origin'
alias pull='git pull'
alias clone='git clone'
alias stash='git stash'
alias pop='git stash pop'
alias ga='git add'
alias gb='git branch'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gm='git merge'
# Bash aliases
alias .='cd .'
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
alias bashclear='echo "" > ~/.bash_history'
alias cls='clear'
alias ls='ls -F --color=auto --show-control-chars'
alias ll='ls -l'
alias ll.='ls -la'
alias lls='ls -la --sort=size'
alias llt='ls -la --sort=time'
alias rm='rm -iv'
alias work='cd /c/repos'
# Bash shell settings
# Typing a directory name just by itself will automatically change into that directory.
shopt -s autocd
# Automatically fix directory name typos when changing directory.
shopt -s cdspell
# Automatically expand directory globs and fix directory name typos whilst completing.
# Note, this works in conjuction with the cdspell option listed above.
shopt -s direxpand dirspell
# Enable the ** globstar recursive pattern in file and directory expansions.
# For example, ls **/*.txt will list all text files in the current directory hierarchy.
shopt -s globstar
# Ignore lines which begin with a <space> and match previous entries.
# Erase duplicate entries in history file.
HISTCONTROL=ignoreboth:erasedups
# Ignore saving short- and other listed commands to the history file.
HISTIGNORE=?:??:history
# The maximum number of lines in the history file.
HISTFILESIZE=99999
# The number of entries to save in the history file.
HISTSIZE=99999
# Set Bash to save each command to history, right after it has been executed.
PROMPT_COMMAND='history -a'
# Save multi-line commands in one history entry.
shopt -s cmdhist
# Append commands to the history file, instead of overwriting it.
# History substitution are not immediately passed to the shell parser.
shopt -s histappend histverify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment