git上传代码到code.csdn.net出错
2016-06-02 00:00
302 查看
用git push代码到csdn code的时候出现错误
error:failed to push some refs to …
Dealing with “non-fast-forward” errors
From time to time you may encounter this error while pushing:
$ git push origin master
To ../remote/
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to ‘../remote/’
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the ‘non-fast forward’
section of ‘git push –help’ for details.
找了很多网上的答案都是
先把git的东西fetch到你本地然后merge后再push
和
都是错的,正确的是
一定要加 git@这
然后push
master代表主分支
error:failed to push some refs to …
Dealing with “non-fast-forward” errors
From time to time you may encounter this error while pushing:
$ git push origin master
To ../remote/
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to ‘../remote/’
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the ‘non-fast forward’
section of ‘git push –help’ for details.
找了很多网上的答案都是
先把git的东西fetch到你本地然后merge后再push
$ git fetch $ git merge
和
$ git pull
都是错的,正确的是
$ git pullgit@code.csdn.net:你的名字\……
一定要加 git@这
然后push
$ git push -u 名字 master
master代表主分支
相关文章推荐
- C# 加密
- git上传代码到code.csdn.net
- WPF C# 字符串读写文件
- 用git上传代码到新浪云
- C# 格式化字符串
- C#将dll打包到程序中
- C# wpf 列出文件夹所有文件
- C++宽字符串转字符串
- C# 获得系统环境
- C# 6.0 $"Hello {csdn}"
- C# wpf 使用资源文件 resx
- C# wpf image绑定viewModel没有显示图片
- 第一次python,第一次爬虫
- 编程语言漫谈
- JBoss与jdk版本
- Exception in thread "main" java.lang.NoClassDefFou
- Java Zip 压缩、解压
- SpringMVC学习笔记(7):处理模型数据(2)
- JAVA原子性操作
- c++的输入和输出