上传至github指令

第一步:在README.md文件添加标题

echo "# guess-ud2" >> README.md

  

第二步:初始化git

git init

  

第三步:添加文件(.  是所有文件,也可指定文件)

git add .

  

第四步:给添加的文件加上注释(此处为 first commit)

git commit -m "first commit"

  

第五步:添加远程仓库 (此处 https://github.com/... 为地址)

git remote add origin https://github.com/...

  

最后一部:将本地的master分支推送到origin主机,同时指定origin为默认主机

此过程需输入github帐号密码

git push -u origin master

  

原文地址:https://www.cnblogs.com/handsome-jm/p/10072268.html