add_github_remote.

This commit is contained in:
2015-07-21 16:51:23 -07:00
parent 1d925784b4
commit 1ce47d897d
2 changed files with 11 additions and 0 deletions

View File

@@ -390,3 +390,13 @@ function pkill_zsh {
function find_by_size {
find . -type f -size +$1
}
function get_git_project_name {
# "$(basename $(git rev-parse --show-toplevel))"
basename $(git remotes | get_cols 2)
}
function add_github_remote {
local project_name="$(get_git_project_name)"
git remote add "$1" "git@github.com:$1/$project_name"
}