Bash: repo option for git-github/git-bitbucket aliases.
This commit is contained in:
parent
f86ff28c56
commit
1d5e6d6662
@ -136,17 +136,19 @@ function yay() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Setup syncronization of current Git repo with GitHub repo of the same name
|
# Setup syncronization of current Git repo with GitHub repo of the same name
|
||||||
|
# USAGE: git-github [repo]
|
||||||
function git-github() {
|
function git-github() {
|
||||||
user="sapegin"
|
user="sapegin"
|
||||||
repo=`basename "$(pwd)"`
|
repo=${1-`basename "$(pwd)"`}
|
||||||
git remote add origin "git@github.com:$user/$repo.git"
|
git remote add origin "git@github.com:$user/$repo.git"
|
||||||
git push -u origin master
|
git push -u origin master
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup syncronization of current Git repo with Bitbucket repo of the same name
|
# Setup syncronization of current Git repo with Bitbucket repo of the same name
|
||||||
|
# USAGE: git-bitbucket [repo]
|
||||||
function git-bitbucket() {
|
function git-bitbucket() {
|
||||||
user="sapegin"
|
user="sapegin"
|
||||||
repo=`basename "$(pwd)"`
|
repo=${1-`basename "$(pwd)"`}
|
||||||
git remote add origin "https://$user@bitbucket.org/$user/$repo.git"
|
git remote add origin "https://$user@bitbucket.org/$user/$repo.git"
|
||||||
git push -u origin master
|
git push -u origin master
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user