Last active
June 11, 2020 12:23
-
-
Save Naramsim/b1d804cee8907f096e51a2577fc5a79a to your computer and use it in GitHub Desktop.
git & npm shortcuts
This file contains hidden or 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
set-location c:\Users\Ale\Documents\GitHub | |
Write-Host "Setting up GitHub Environment" | |
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") | |
Write-Host "Setting up Posh-Git" | |
. (Resolve-Path "$env:github_posh_git\profile.example.ps1") | |
Remove-Item alias:gcm -Force | |
Remove-Item alias:gc -Force | |
Remove-Item alias:gp -Force | |
Remove-Item alias:gm -Force | |
function Fnig { npm install -g $args } | |
function Fnis { npm install --save $args } | |
function Fnid { npm install --save-dev $args } | |
function Fgcm { git commit -m $args } | |
function Fgc { git clone $args } | |
function Fga { git add . } | |
function Fgp { git push } | |
function Fgpull { git pull } | |
function Fgamp { git add .; git commit -m $args; git push } | |
function Fdcu { docker-compose up $args } | |
function Fdcd { docker-compose down } | |
function Fd { docker $args } | |
function Fde { docker exec -it $args } | |
function Fsettitle { $host.ui.RawUI.WindowTitle = $args } | |
function FsshP { ssh [email protected] } | |
Set-Alias g git | |
Set-alias nig Fnig -Option AllScope | |
Set-alias nis Fnis -Option AllScope | |
Set-alias nid Fnid -Option AllScope | |
Set-alias gcm Fgcm -Option AllScope | |
Set-alias gc Fgc -Option AllScope | |
Set-alias ga Fga -Option AllScope | |
Set-alias gp Fgp -Option AllScope | |
Set-alias gpull Fgpull -Option AllScope | |
Set-alias gamp Fgamp -Option AllScope | |
Set-alias dcu Fdcu -Option AllScope | |
Set-alias dcd Fdcd -Option AllScope | |
Set-alias d Fd -Option AllScope | |
Set-alias de Fde -Option AllScope | |
Set-alias settitle Fsettitle -Option AllScope | |
Set-alias sshP FsshP -Option AllScope |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment