1,新建文件夹,在文件下下鼠标右键git bush--->git init,初始化仓库;

2,设置gitthub仓库地址:git remote add origin https://github.com/z*****g/lm.git

3,git pull origin master

4,git push --set-upstream origin master,关联一个远程分支,并从这个分支上传下带代码

git branch查看分支

git add .

git commit -m "提交注释"

git checkout  master 切换到master分支

git pull 从远程仓库拉去最新代码,更新代码后,要看代码是否有冲突,解决冲突后,git merge

git push把代码提交到远程仓库,git merge

更新提交代码直接加上拉取/提交的分支,如下:

参考网址:

https://blog.csdn.net/benben_2015/article/details/78803753

https://www.cnblogs.com/xuanhun/p/6019038.html

git连接不上远程仓库---visualstudio提交代码报错:no upstream configured for branch 'master'的更多相关文章

  1. git推送代码报错:fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream

    情景再现 远程新建仓库,然后本地 git bash执行以下代码 git init git add . git commit -m 'xxx' git remote add origin https:/ ...

  2. git提交代码报错 trailing whitespace的解决方法

    1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...

  3. svn 提交代码报错

    svn 提交代码报错 最近新安装了TortoiseSvn 1.92,在上传代码,其中有新增加的文件,出现如下错误: 解决方法: 1.用vs生成patch文件 2.生成的patch文件中讲nonexis ...

  4. git远程仓库、提交代码操作

    初始化仓库 1.初始化 git init #或 git clone 远程仓库地址 git init 后续要添加远程仓库,git clone不需要再添加 2.连接仓库 git remote add 远程 ...

  5. Git提交代码报错Git push error:src refspec XXX matches more than one解决方案

    Git提交代码push时,报错这个 error: src refspec master matches more than one. error: failed to push some refs t ...

  6. 本地Git连接GitLab(服务器)远程仓库

    1.简介 远程仓库是指托管在网络上的项目仓库,现在互联网上有很多项目托管平台,比如github.gitlab等.为了不公开自己项目代码,可以在自己的服务器上搭建自己的项目仓库,最常见的是搭建GitLa ...

  7. GIT 使用(二):创建仓库并提交代码

    基本操作 所用命令使用 windows 下安装 git-bash 运行 Table of Contents 先决条件 已经安装了 GIT 客户端 已经设置用户信息 如果没做可以看安装和配置 获取 Gi ...

  8. git 提交代码报错failed to push some refs to 解决笔记

    Administrator@SC- MINGW64 /e/gitrepository (master) $ git push django master To github.com:zgc137/dj ...

  9. 码云 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 ...

随机推荐

  1. pytorch使用不完全文档

    1. 利用tensorboard看loss: tensorflow和pytorch环境是好的的话,链接中的logger.py拉到自己的工程里,train.py里添加相应代码,直接能用. 关于环境,小小 ...

  2. Django的安装和一些操作

    1.安装 (1) 命令行: pip install django==1.11.18 pip install django==1.11.18 -i 源 (2) pycharm setting —> ...

  3. 小程序如何封装自定义组件(Toast)

    1.创建和pages 同级的component目录新建一个myToast目录 例如: 2.myToast.wxml文件内容: <!-- 自定义toast组件 --> <!-- nam ...

  4. kubernetes 开发 code-generator

    主要参考项目 https://github.com/kubernetes/code-generator 1. git clone https://github.com/kubernetes/code- ...

  5. quill富文本编辑器 API

    //1. 从第三个开始删除,删除4个 // console.log(this.quill.deleteText(2, 4)); // 12345678 1278 // 2.(返回对象)返回从第三个开始 ...

  6. 制作用户登录界面(JAVA实现)

    设计实现如图所示的个人信息注册.包含单选按钮.多选按钮.下拉框事件. Zuoye类: package example02; import java.awt.event.ActionEvent; imp ...

  7. 有关this

    this是Javascript函数内部的一个特殊对象,引用的是函数运行时的环境对象,也就是说,this是动态的(箭头函数除外),是在运行时进行绑定的,并不是在编写时绑定(箭头函数是编写时绑定). th ...

  8. AutoCAD设置透明度后不起效果

    在AutoCAD中设置了实体的透明度,但是看到的效果是不透明 解决方法: 设置系统变量TRANSPARENCYDISPLAY

  9. Bootstrap3基础 栅格系统 col-lg/md/sm/xs-* 简单示例

      内容 参数   OS   Windows 10 x64   browser   Firefox 65.0.2   framework     Bootstrap 3.3.7   editor    ...

  10. LeetCode120-Triangle-数组,动态规划

    题目描述 Problem Description:   Given a triangle, find the minimum path sum from top to bottom. Each ste ...