github 上传项目遇到的问题

一、提交问题 

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

  

解决: 

 输入:git remote add origin git@github.com:yourusername/test.git,然后再重新提交

其中yourusername就是github的账号,test就是需要提交代码的仓库名。

二、add时候的警告

The file will have its original line endings in your working directory warning: LF will be replaced

 解决:

 

过程:在项目根目录打开bash命令界面

1、初始化 git init :  生成一个.git文件夹(隐藏的)

2. git add . 将项目内容add到缓存区

3.git commit -m "first commit"  :提交注释

4.git remote add origin xxxxx(git复制的路径):用于连接远程git库

5.git push -u origin master  :从缓存区提交到源git路径库

结果:

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值