git使用过程中遇到的问题

windows中换行符CRLF,而在Linux下的换行符为LF,所以在执行add.时出现错误:

 $rm -rf .git      
 $git config --global core.autocrlf false //禁用自动换行
 重新初始化仓库:
 $ git init     
 $ git add.

远程仓库地址错误

remote: This repository moved. Please use the new location [new location]
解决命令:

  git remote -v
  git remote rm origin
  git remote add origin 远程地址

##git文件修改而本地没有修改
! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 出现错误:
本地需要pull代码,更新成最新的,
解决命令:

 - git pull --rebase origin master
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值