Skip to content

Instantly share code, notes, and snippets.

View cheroliv's full-sized avatar

cheroliv cheroliv

View GitHub Profile
@cheroliv
cheroliv / .zsh_create_alias
Created November 3, 2020 17:02 — forked from prathik/.zsh_create_alias
create alias, make alias and remove alias shortcut for zsh
alias showalias='cat ~/.zsh_alias'
#Add source ~/.zsh_alias in your ~/.zshrc
#Type ma <aliasname> in a directory and it will create an alias to cd into that directory
makeAlias()
{
curDir=`pwd`
echo "alias $1='cd $curDir'" >> ~/.zsh_alias
source ~/.zshrc
}
@cheroliv
cheroliv / GitDeleteCommands.ps1
Created October 15, 2020 20:46 — forked from cmatskas/GitDeleteCommands.ps1
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch