使用git推送文件到远程仓库

教学笔记 智学无忧-老曹
文章标签: git git push
222

使用git推送文件到远程仓库

一、克隆远程仓库到本地

git clone xxx

问题:很多初学者目录乱存储,没有仓库分开的仓库分开的概念

需要身份验证,输入用户名和密码

image.png

在这里输入用户名,就是登录码云时需要的用户名,一般是手机号,邮箱

image.png

输入密码

注意:可能会出现访问被拒绝的错误  access denied 这样的字样
解决的方式-需要重新输入用户名和密码:

git config --system --unset credential.helper 

下次输入密码保存

git config --global credential.helper store

二、在本地仓库添加index.html文件,并推送到远程仓库

  1. 在仓库目录里创建index.html文件,编辑一些内容
  2. 提交到本地仓库
  3. 提交到远程仓库  git push origin master  简化  git push 

还能输出{{restrictNumber}}个字符  
  • {{reply.author}}

    {{CommonUtil.formateDate(reply.ac_CommentDate).shortTime}}
  • 回复了{{Comments.author}} :