步骤是:

  1. 在github上new一个新仓库
  2. 在本地需要提交的文件夹下  git clone 自己仓库的url
  3. mv 文件 /仓库名称
  4. 进入仓库的文件夹下
  5. git status
  6. git add .
  7. git commit -m "描述"
  8. git push origin xxx(本地分支名  git branch查看)

注意:push的文件夹不能为空

出现的问题:

一、执行6的时候出现:warning: LF will be replaced by CRLF in XXXX. The file will have its original line endings in your working directory

  解决方法:执行git config --global core.autocrlf false,再执行6

二、执行8的时候出现:fatal: unable to access 'https://github.com/.......': OpenSSL SSL_read: Connection was reset, errno 10054

  解决方法:执行git config --global http.sslVerify "false",再执行8

三、再次执行8的时候出现:Failed to connect to github.com port 443: Timed out