上传到github的指令

来源:互联网 发布:linux user nobody 编辑:程序博客网 时间:2024/05/16 04:42

…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

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

源自github的提示信息,博主记性不好,只是收集起来方便自己看。
0 0