…或在命令行上创建新存储库
git remote add origin https://github.com/gongmeitin/r.git(链接远程)
git branch -M master(创建远程分支)
git push -u origin master(推送远程)
…或从命令行推送现有存储库
echo “# r” >> README.md
git init
git add README.md
git commit -m “first commit”
git branch -M master(创建远程分支)
git remote add origin https://github.com/gongmeitin/r.git(链接远程)
git push -u origin master(推送远程)
1 首先,登陆GitHub,然后,在右上角找到“Create a new repo”按钮,创建一个新的仓库:
https://github.com/gongmeitin/r.git
echo "# r" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M master
git remote add origin https://github.com/gongmeitin/r.git
git push -u origin master
2 下一步,就可以把本地库的所有内容推送到远程库上:
[root@localhost 222]# git remo