免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年4月21日 星期二

command line to create repo


instead of using web browser,
use command line shell to create repo on remote git server
-- bitbucket or github


//=== bitbucket
http://stackoverflow.com/questions/13788485/create-new-repo-on-bitbucket-from-git-bash-terminal

$ curl --user username:passwd https://api.bitbucket.org/1.0/repositories/ \
--data name=REPO_NAME \
--data is_private='true' \
--data owner=team_name \

git remote add bitbucket git@bitbucket.org:username/reponame.git
# git push -u bitbucket --all
# git push -u bitbucket --tags
$ git push -u bitbucket master


//=== github
http://stackoverflow.com/questions/2423777/is-it-possible-to-create-a-remote-repo-on-github-from-the-cli-without-ssh

curl -u 'user13' https://api.github.com/user/repos -d '{"name":"phonecat1"}'

[https git]
git remote add github https://github.com/user13/phonecat1.git

[ssh git]
git remote add github git@github.com:user13/phonecat1.git

git push -u github master


沒有留言:

張貼留言