git 本地push到远程仓库

212 阅读1分钟

git 本地push到远程仓库

  • 没有ssh先添加ssh
  • 本地有了ssh打开id_rsa.pub,远程仓库复制粘贴上去 // 如果第一次记得,添加用户名和邮箱
  • cd到项目文件夹 init
  • git add -A // 本地所有文件添加到暂存区
  • git commit -m "first commmit" // 添加修改内容注释
  • git remote add banner git@github.com:AsaZws/urceri.git // banner是仓库名字
  • git push -u banner master // banner 是刚建立的远程仓库名字,master 是本地仓库的主干分支(目前就这一个分支)