上传到github的指令


…or create a new repository on the command line
使用命令行 新建仓库:
echo "# 项目名" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/账号名/项目名.git
git push -u origin master

…or push an existing repository from the command line
使用命令行 上传到已存在的仓库:
git remote add origin https://github.com/账号名/项目名.git
git push -u origin master

之后更新代码可以直接使用git push。

源自github的提示信息,博主记性不好,只是收集起来方便自己看。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章