12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- if (( $+commands[hub] )); then
- alias git=hub
- fi
- empty_gh() {
- emulate -L zsh
- local repo=$1
- mkdir "$repo"
- touch "$repo/README.md"
- new_gh "$repo"
- }
- new_gh() {
- emulate -L zsh
- local repo="$1"
- cd "$repo" \
- || return
- git init \
- || return
-
- print '.*'"\n"'*~' >> .gitignore
- git add [^.]* \
- || return
- git add -f .gitignore \
- || return
- git commit -m 'Initial commit.' \
- || return
- hub create \
- || return
- git push -u origin master \
- || return
- }
- exist_gh() {
- emulate -L zsh
- local repo=$1
- cd "$repo"
- hub create \
- || return
- git push -u origin master
- }
- git.io() {
- emulate -L zsh
- curl -i -s https://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "
- }
|