Skip to content

Instantly share code, notes, and snippets.

View hamzahamidi's full-sized avatar
👀
I may be slow to respond.

Hamza Hamidi hamzahamidi

👀
I may be slow to respond.
View GitHub Profile
@hamzahamidi
hamzahamidi / angular-cli.sh
Created July 24, 2018 07:54
default package manager YARN, NPM, CNPM
# make YARN default
ng config -g cli.packageManager yarn
# make CNPM default
ng config -g cli.packageManager cnpm
# make NPM default
ng config -g cli.packageManager npm
@hamzahamidi
hamzahamidi / tag-delete.sh
Created July 21, 2018 16:56
Delete tag locally & remote
# delete tag locally
git tag -d tagName
# delete tag remote
git push --delete origin tagName
github_repo="https://github.com/repo/repo.git"
TAGS=$(git ls-remote --refs --tags ${github_repo} | awk -F/ '{ print $3 }' | awk '{print $NF}')
LATEST_TAG=$(echo $TAGS | awk '{print $(NF-1)}')
echo $LATEST_TAG