github上传和下载代码(SSH)

上传:

git init
git add .
git commit -m 'test'
git remote add origin git@github.com:plantdean/VVCSoftware_VTM-9.3_Pure.git
git branch -M master
git push -u origin master

下载:

git pull origin master

1. 如果出现了remote origin already exists的错误,rm一下即可:

git remote rm origin

2. 如果有LF will be replaced by CRLF......:

    仅对当前git仓库有效:

git config core.autocrlf false

    全局有效:

git config --global core.autocrlf false

3. 如果出现git pull时出现Your local changes to the following files would be overwritten by merge...,如果不想保留本地的修改:

git reset --hard

参考:

Git教程——将本地库内容推送到GitHub远程库【ssh方式】 - 知乎

Git 如何将远程仓库的项目克隆到本地及如何推送到远程仓库(Git常用的命令)_git将远程仓库更新到本地_简单快乐_wsh的博客-CSDN博客

warning: LF will be replaced by CRLF in 的原因及解决办法_Programmer not bald的博客-CSDN博客

git pull时报错:Your local changes to the following files would be overwritten by merge-CSDN博客

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值