1、git init

2、git add .

3、git commit  -m "init"

4、git remote add origin  https://gitee.com/ftl_663/java-shop.git(远程仓库地址)

5、git push -u origin master

提示  failed to push some refs to 'https://gitee.com/ftl_663/java-shop.git'

从网上查到

git pull --rebase origin master

执行语句 git push -u origin master 即可完成代码上传到github

但是还不行

最后强制上传才可以

git push -u -f origin master

创建分支 git checkout -b v1.0 origin/master

上传分支  git  push origin HEAD -u

failed to push some refs to 'https://gitee.com/ftl_663/java-shop.git'的更多相关文章

  1. 码云 VS首次提交代码报错:failed to push some refs to 'https://gitee.com/Liu_Cabbage/ASP.NET-MVC-QQ-Connect.git'

    打开命令提示符: 执行合并命令: git pull --rebase origin master 最后总结: 1.多为第一次提交代码,本地和码云仓库不一致,README.md文件不在本地代码目录中 2 ...

  2. vue 项目上传到码云,push时error: failed to push some refs to 'https://gitee.com/mawenrou/vue_ht.git'

    vue 项目上传到码云,push时error: failed to push some refs to 'https://gitee.com/mawenrou/vue_ht.git' 因为之前已经创建 ...

  3. git push报错! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://gitee.com/XXX.git

    git pull origin master --allow-unrelated-histories  //把远程仓库和本地同步,消除差异 git add . git commit -m"X ...

  4. error: failed to push some refs to 'https://gitee.com/xxx/xxx'

    一开始以为是本地版本和线上的差异 果断先直接pull  之后 还是不对,哎 不瞎搞了  搜... 获得消息: git pull --rebase origin master 原来如此:是缺失了文件

  5. error: failed to push some refs to 'https://github.com/github账号/learn_git.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caus

    在使用git 对源代码进行push到gitHub时可能会出错,信息如下   此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master ...

  6. git 报错:error: failed to push some refs to 'https://github.com/Anderson-An/******.git'(已解决)

    提交push 报错: $ git push origin masterTo https://github.com/Anderson-An/******.git ! [rejected] master ...

  7. error: failed to push some refs to 'https://github.com/username/python.git'

    解决error: failed to push some refs to 'https://github.com/bluepen/python.git' 当我们在使用git工具上传我们自己的代码时,可 ...

  8. 错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

    一.问题在进行[git push orgin master]的时候出现如下错误 ! [rejected] master -> master (non-fast-forward) error: f ...

  9. git push ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/Operater9/guest' hint: Updates were rejected because the tip of your current bra

    推送本地代码到github报错 git push报错 ! [rejected] master -> master (non-fast-forward) error: failed to push ...

随机推荐

  1. B/S(WEB)系统中使用Activex插件调用扫描仪实现连续扫描并上传图像(IE文件扫描并自动上传)

    IE浏览器下使用Activex插件调用客户端扫描仪扫描文件并山传,可以将纸质档案(如合同.文件.资料等)扫描并将扫描图像保存到服务器,可以用于合同管理.档案管理等. 通过插件方式调用扫描仪扫描并获取图 ...

  2. C\C++中strcat()函数、sprintf函数

    http://blog.csdn.net/smf0504/article/details/52055971 http://c.biancheng.net/cpp/html/295.html

  3. 搜索引擎keyword智能提示的一种实现

    问题背景 搜索关键字智能提示是一个搜索应用的标配.主要作用是避免用户输入错误的搜索词,并将用户引导到相应的关键词上,以提升用户搜索体验. 美团CRM系统中存在数以百万计的商家,为了让用户高速查找到目标 ...

  4. CentOS系统如何设置服务开机自动运行

    centos安装好apache,mysql等服务器程序后,并没有设置成开机自动启动的,为避免重启后还要手动开启web等服务器,还是做下设置好,其实设置很简单,用chkconfig命令就行了.例如要开机 ...

  5. Android 怎样查看系统的memory swap 资讯/信息

    前言          欢迎大家我分享和推荐好用的代码段~~ 声明          欢迎转载,但请保留文章原始出处:          CSDN:http://www.csdn.net        ...

  6. Office EXCEL 如何保留一位小数,并且单击这个单元格的时候没有一大串小数

    左侧有一列数据,即便我设置单元格格式,把小数位数设为1,看上去的确四舍五入,保留一位小数了,但是实际上我鼠标双击任意单元格,还是原来的数值,这样的数据如果是要发给别人的,肯定不好   如果进行选择性粘 ...

  7. Guice 学习(八)AOP (面向切面的编程)

    Guice的AOP还是非常弱的.眼下只支持方法级别上的,另外灵活性也不是非常高. 看例如以下演示样例: Guice支持AOP的条件是: 类必须是public或者package (default) 类不 ...

  8. System.Diagnostics.Debug.WriteLine 在OutPut中无输出

    TextWriterTraceListener writer = new TextWriterTraceListener(System.Console.Out);              Debug ...

  9. spring的PROPAGATION_REQUIRES_NEW事务,下列说法正确的是(D)

    A:内部事务回滚会导致外部事务回滚 B:内部事务回滚了,外部事务仍可以提交 C:外部事务回滚了,内部事务也跟着回滚 D:外部事务回滚了,内部事务仍可以提交 PROPAGATION_REQUIRES_N ...

  10. CAS和ABA

    1 CAS compare and swap的缩写,详见乐观锁和悲观锁. 2 ABA 就是说,我获取的旧值是A,然后被人修改成了B,但是又被人修改成了A,我就认为并没有修改,更新内存. 解决办法,给每 ...