GitBash常见错误
2018-04-02 11:07
176 查看
1. $ git remote -v 后无反应
原因:远程仓库未创建(有可能是复制的远程仓库用的https地址,而原来远程仓库地址remote url设置的是ssh地址)
解决方案:创建远程仓库即可
$ git remote add orgin(远程仓库名) url(远程仓库地址ssh/https)
注意 : ”url”不需要打上
2.
error:Unknown subcommand:origin
远程仓库origin不存在(需要先创建远程仓库)
3.
usage: git remote add [<options>] <name> <url>
创建远程仓库格式不正确
4..本地仓库push到远程仓库失败
error: failed to push some refs to 'https://github.com/Chouett/weatherstore.git'
原因:
GitHub远程仓库中的README.md文件不在本地仓库中。
解决方案:
(1)
$ git pull --rebase origin master
$ git push -u origin master
(2)使用强制push的方法:$ git push -u origin master -f 多人协作不建议使用
原因:远程仓库未创建(有可能是复制的远程仓库用的https地址,而原来远程仓库地址remote url设置的是ssh地址)
解决方案:创建远程仓库即可
$ git remote add orgin(远程仓库名) url(远程仓库地址ssh/https)
注意 : ”url”不需要打上
2.
error:Unknown subcommand:origin
远程仓库origin不存在(需要先创建远程仓库)
3.
usage: git remote add [<options>] <name> <url>
创建远程仓库格式不正确
4..本地仓库push到远程仓库失败
error: failed to push some refs to 'https://github.com/Chouett/weatherstore.git'
原因:
GitHub远程仓库中的README.md文件不在本地仓库中。
解决方案:
(1)
$ git pull --rebase origin master
$ git push -u origin master
(2)使用强制push的方法:$ git push -u origin master -f 多人协作不建议使用
相关文章推荐
- Git Bash for Windows
- 简单快速的上手使用gitbash
- windows下基于gitbash上传项目到github
- win8下把Git Bash Here添加到右键菜单
- 使用git工具上传代码文件到github
- GitBash 下如何解决javac/java编译运行乱码问题
- 利用git bash把本地项目上传的github
- gitbash的使用,本地建feature branch
- git之github的简单使用
- git bash 如何cd进带空格文件名
- gitbash-coding 代码仓库 代码备份 命令使用
- 使用Git Bash将本地项目push到远程版本库
- git常用命令详解
- 修改GITBASH命令提示符
- Git的简单使用
- Git Bash 快捷键
- git bash 集成到 webStorm 中(IDEAPhpStormWebStorm适用)
- github简单使用方法【使用git bash】
- GitBash不支持中文(终端输出显示中文乱码)的简单解决办法(自测试Okay)
- gitbash https git credentials 小乌龟 TortoiseGit 配置备忘