关键词:git、gitee、码云、上传远程仓库失败

1.gitee有一个远程仓库名字是CommandModel,里面只有两个README文件

2.假如我目录  D:\eclipse\workspace    有个CommandModel项目需要上传到远程仓库

3.打开git bash ,进入 D:\eclipse\workspace ,输入git init  生成本地仓库

4.输入git add CommandModel  回车,输入git commit -m"the first version" 回车

5.输入git remote add CommandModel https://gitee.com/jiangfenli/CommandModel.git 关联远程仓库 (如果已关联可以跳过,注意后面的地址改成自己的)

6.输入 git push CommandModel master 推送代码到远程仓库

会报错

7.输入git pull origin master --allow-unrelated-histories

8.输入i 进入insert模式,再按键盘左上角 esc 键,接着输入 :wq ,回车

9.这时就可以进行push操作了

10.打开gitee远程仓库,发现已经成功上传自己的项目

[笔记]解决git本地仓库不能上传到gitee远程仓库的问题的更多相关文章

  1. Git——新手入门与上传项目到远程仓库GitHub

    Git:先进的分布式版本控制系统,一个开源式的分布式版本控制工具. Git安装 在Windows操作系统下,访问Git下载地址https://git-for-windows.github.io/ 注册 ...

  2. Git——新手入门与上传项目到远程仓库GitHub(转)

    Git概述 什么是Git? 刚开始对这个东西也感到挺迷茫,并且问了好多已经学习android一段时间的同学也是一头雾水,直到了解并使用之后,才体会到Git的好处以及重要意义. Git:是目前世界上最先 ...

  3. 【Azure 应用服务】App Service 在使用GIt本地部署,上传代码的路径为/home/site/repository,而不是站点的根目录/home/site/wwwroot。 这个是因为什么?

    问题描述 App Service 在使用GIt本地部署,上传代码的路径为/home/site/repository,而不是站点的根目录/home/site/wwwroot. 这个是因为什么? 并且通过 ...

  4. IDEA新项目代码上传到gitlab远程仓库

    IDEA新项目代码上传到gitlab远程仓库 具体步骤 创建本地仓库 IDEA:VCS-->Import into Version Control-->Create Git Reposit ...

  5. git 上传项目到远程仓库

    电脑安装git客户端.注册github账号并登陆 到本地项目文件夹右键选择git bash here 输入个人信息(代码提交者) git config --global user.name " ...

  6. Git操作:绑定上传已存在的仓库到Github

    之前使用github都是创建一个全新的仓库,然后clone下来用,但如果我已经有一个正在使用的仓库,想要绑定上传已存在的仓库到github,怎么做呢?其实在github创建仓库的时候会提示: …or ...

  7. git本地项目代码上传至码云远程仓库总结【转】

    转载自 :https://blog.csdn.net/fox9916/article/details/78253714 git基本使用小结 之前公司的版本控制工具一直用的是svn,最近要改用git,之 ...

  8. git 第一次上传本地代码到远程仓库,解决 ! [rejected] master -> master (non-fast-forward)错误

    使用git想GitHub远程仓库上传代码的基本步骤一般是 初始化为git仓库 git init 添加所有要提交的文件 git add . 本次提交说明 git commit -m '提交说明' 关联G ...

  9. git 上传本地代码到远程仓库

    未经允许,禁止转载! 查看哪些文件被修改过:git status 查看具体的修改内容:git diff 对新添加的文件进行添加:git add 文件名 提交修改标记:git commit -m &qu ...

随机推荐

  1. Python with MYSQL - sytax problem

    Con= MySQLdb.connect(host=',db='test') cur=Con.cursor() cur.execute('insert into staff_daily(Date,Na ...

  2. listen and translation exercise 49

    Huh? Appears to Be Universally Understood What's the most universal utterance in languages across th ...

  3. STL memory.cpp

    memory.cpp # // Filename: memory # # // Comment By: 凝霜 # // E-mail: mdl2009@vip.qq.com # // Blog: ht ...

  4. 1014 Waiting in Line (30)(30 分)

    Suppose a bank has N windows open for service. There is a yellow line in front of the windows which ...

  5. poj3585 Accumulation Degree[树形DP换根]

    思路其实非常简单,借用一下最大流求法即可...默认以1为根时,$f[x]$表示以$x$为根的子树最大流.转移的话分两种情况,一种由叶子转移,一种由正常孩子转移,判断一下即可.换根的时候由頂向下递推转移 ...

  6. 2017.10.5北京清北综合强化班DAY5

    拼不出的数lost.in/.out/.cpp[问题描述]3 个元素的集合{5, 1,2} 的所有子集的和分别是0,1, 2, 3, 5, 6, 7, 8.发现最小的不能由该集合子集拼出的数字是4.现在 ...

  7. centos7添加环境变量

    # vim /etc/profile在最后,添加:export PATH="/usr/local/webserver/mysql/bin:$PATH" #添加的路径保存,退出,然后 ...

  8. 我的SIP开发之路

    http://hi.baidu.com/ltlovelty/blog/item/837baf1ece7fc6f11ad57647.html 经过对SIP协议和开源协议栈快半年的研究,我现在终于有点入门 ...

  9. python version 2.7 required,which was not found in

    python version 2.7 required,which was not found in 出现上面这种情况的原因我推测有两种: 1.NumPy和SciPy官方网站上只提供了32bit的文件 ...

  10. GIT URI

    https://u3shadow@code.google.com/p/myandorid/