从本地推送到远程github的空仓库
新建github仓库里面不要勾选相关设置,防止上推到时候冲突。
本地首先 git init 初始化
工作区发现一些工作,比如新建文件等等
git add .提交到缓存区
git commit -m 'msg' 提交到仓库
git remote add origin
git remote add origin xxxxxxx
添加远程仓库地址,在.git/config里面的配置将发生改变。
在config文件添加了该remote信息
第一次推送需要设置-u
git push -u origin master 实际效果为git push --set-upstream origin master

下载远程仓库的代码
git clone ssh地址

git小技巧
git checkout -
返回上一个分支,很方便.


相关文章:

  • 2022-12-23
  • 2021-11-13
  • 2021-10-16
  • 2021-09-09
  • 2021-07-31
  • 2021-09-15
  • 2019-03-16
猜你喜欢
  • 2021-12-09
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2021-09-28
  • 2021-11-12
  • 2022-12-23
相关资源
相似解决方案