Needs git and gh.
Add to .bashrc
github() {
[[ "$1" != "init" ]] && return
parent=$(builtin cd "$PWD/.." && pwd)
if [[ "$parent" == "/home/richeney" || "$parent" == "/git" ]]
then
git init
gh repo create $(basename $PWD) --public --source=.
else
echo "Parent directory is neither /home/richeney nor /git"
fi
}Example:
mkdir multitenanted_aks && cd multitenanted_aksgit initInitialized empty Git repository in /git/multitenanted_aks/.git/
echo "# Multi-tenanted AKS with workload identities" > README.mdgit add --allgit commit -a -m "Initial commit"[main (root-commit) c0864ce] Initial commit
1 file changed, 1 insertion(+)
create mode 100644 README.md
gh repo createAnd follow the prompts. Or:
gh repo create $(basename $PWD) --public --source=. --add-readmecode ,