Last active
December 27, 2023 19:21
-
-
Save ernestohs/e3fc2d8c936f173128cca159391ca324 to your computer and use it in GitHub Desktop.
how lazy I am
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias push='git push origin $(git rev-parse --abbrev-ref HEAD)' | |
alias pull='git pull --recurse-submodules origin $(git rev-parse --abbrev-ref HEAD)' | |
alias s="git status -s" | |
alias c="git commit -m " | |
alias a='git add . && git status -s' | |
alias l='git log --oneline --all --graph --decorate' | |
alias gb='git fetch && git checkout ' | |
alias undo='git checkout --' | |
alias reset='git reset --hard HEAD~1' | |
alias clean='git clean -dnx' | |
alias branch='git checkout -b' | |
alias friday='pull && git commit -a -m "[WIP] Lastest changes from Friday" && push' | |
alias changes='git diff --' | |
alias nomerge='git merge --abort' | |
alias dc='sudo docker-compose' | |
alias dcu='sudo docker-compose up' | |
alias dcb='sudo docker-compose up --build -d' | |
alias dcd='sudo docker-compose down' | |
alias dcc='sudo docker-compose down -v --remove-orphans' | |
alias nr='npm run' | |
alias nrs='npm run start' | |
alias nrb='npm run build' | |
alias npi='npm install' | |
alias dp='sudo docker ps' | |
alias ls='ls -lah --color=auto' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-GitPush { & git push origin (git rev-parse --abbrev-ref HEAD) $args } | |
New-Alias -Name push -Value Get-GitPush -Force -Option AllScope | |
function Get-GitPull { & git pull --recurse-submodules origin (git rev-parse --abbrev-ref HEAD) $args } | |
New-Alias -Name pull -Value Get-GitPull -Force -Option AllScope | |
function Get-GitStatus { & git status -sb $args } | |
New-Alias -Name s -Value Get-GitStatus -Force -Option AllScope | |
function Get-GitCommit { & git commit -ev $args } | |
New-Alias -Name c -Value Get-GitCommit -Force -Option AllScope | |
function Get-GitAdd { | |
if (!$args) { | |
git add . | |
} else { | |
git add $args | |
} | |
git status -sb | |
} | |
New-Alias -Name a -Value Get-GitAdd -Force -Option AllScope | |
function Get-GitTree { & git log --graph --oneline --decorate $args } | |
New-Alias -Name l -Value Get-GitTree -Force -Option AllScope | |
function Get-GitSwitchBranch { & (git fetch) -and (git checkout $args) } | |
New-Alias -Name gb -Value Get-GitSwitchBranch -Force -Option AllScope | |
function Get-GitUndo { & git checkout -- $args } | |
New-Alias -Name undo -Value Get-GitUndo -Force -Option AllScope | |
function Get-GitReset { & it reset --hard HEAD~1 $args } | |
New-Alias -Name reset -Value Get-GitReset -Force -Option AllScope | |
function Get-GitClean { & git clean -dfx $args } | |
New-Alias -Name clean -Value Get-GitClean -Force -Option AllScope | |
function Get-GitBranch { & git checkout -b $args } | |
New-Alias -Name branch -Value Get-GitBranch -Force -Option AllScope | |
function Get-GitChanges { & git status -vv $args } | |
New-Alias -Name changes -Value Get-GitChanges -Force -Option AllScope | |
function Get-GitNoMerge { & git git merge --abort } | |
New-Alias -Name nomerge -Value Get-GitNoMerge -Force -Option AllScope |
Thanks @mauricioarellano, I already remove the duplicated line
Excellent, friday my favorite haha.
Add a Powershell version, is still green but works
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
line 4 and 5 are duplicated :)