【使用Git时遇到的一些问题】

问题一:git add .时 遇到“fatal: detected dubious ownership in repository”

解决办法:执行下面的命令(注意,不要带引号,也许可以带,但是我的不行):

git config --global --add safe.directory ‘仓库路径’

问题二:git add . 遇到:“warning: in the working copy of 'Winserver/db_manager/README.md', LF will be replaced by CRLF the next time Git touches it”解决办法:执行下面的命令:

git config auto.core.CRLF true

问题三:git push时遇到fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

解决办法:执行下面的命令

git remote rm origin

git remote add origin git@github.com:username/reponame.git

git push -u origin master

即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值