Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/xiebaochun/androidworkplace.git
git push -u origin master
Push an existing repository from the command line
git remote add origin https://github.com/xiebaochun/androidworkplace.git
git push -u origin master
添加remote:
git remote add origin git://new.url.here
切换remote:
需要ssh key:git remote set-url origin git://new.url.here
需要输入账户密码:
git remote set-url origin https://new.url.here