在github上创建仓库:

Create a new repository on the command line





touch README.md

git init

git add README.md

git commit -m "first commit"

git remote add origin https://github.com/BrentHuang/MyRepo.git

git push -u origin master





在本地新建一个分支: git branch Branch1

切换到你的新分支: git checkout Branch1

将新分支发布在github上: git push origin Branch1

在本地删除一个分支: git branch -d Branch1

在github远程端删除一个分支: git push origin :Branch1   (分支名前的冒号代表删除)



直接使用git pull和git push的设置

Git branch
--set-upstream-to=origin/master master 

git branch --set-upstream-to=origin/ThirdParty ThirdParty

git config --global push.default matching


在Git上创建新分支(实用性高!!!)的更多相关文章

  1. 在github上创建新分支

    在github上创建仓库: Create a new repository on the command line touch README.md git init git add README.md ...

  2. git本地创建新分支并推送到远程仓库

    1,在当前项目目录,从已有的分支创建新的分支(如从master分支),创建一个dev分支 git checkout -b dev 2,创建完可以查看一下,分支已经切换到dev git branch * ...

  3. git 从分支上创建一个分支

    相关连接: 创建于合并分支:https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00 ...

  4. Git 创建新分支检查分支

    创建分支和切换分支,也可以称为检出分支 创建新分支 git branch branchName 切换到新分支 git checkout branchName 上面两个命令也可以合成为一个命令: git ...

  5. linux 6.5上创建新用户后,不能登陆?

    linux 6.5上创建新用户后,不能登陆? 使用root账户登陆却可以! [root@ log]# useradd mtdk[root@ log]# echo 123abc |passwd --st ...

  6. Debian 上创建新的用户

    Debian 上创建新的用户 使用Gnome的窗口界面创建 使用Linux的命令创建 添加用户: useradd -d /home/your_username -m your_username 添加密 ...

  7. svn创建新分支报错:svn: E155015: Aborting commit: XXX remains in conflict

    用diea在对svn创建新分支的时候报错,错误为 svn: E155015: Aborting commit: XXX remains in conflict 百度和查阅资料后得知,此错误为分支被拉取 ...

  8. git创建新分支

    1.创建本地分支 git branch 分支名,例如:git branch 2.0.1.20120806 注:2.0.1.20120806是分支名称,可以随便定义.   2.切换本地分支 git ch ...

  9. 在github上创建新的分支(包括管理分支)

    考虑到前面的项目在master分支上,这个不是太友好,下面在只有master分支的基础上,新建一个dev分支 一:查看 1.查看本地分支 git branch 2.查看远程分支 git branch ...

随机推荐

  1. linux中脚本权限问题以及win下使用telnet测试linux端口

    一个脚本叫up,执行脚本报错如下: -bash: ./up: Permission denied 解决: chmod +rx up 在执行,OK了. /************************ ...

  2. $.ajax 错误信息

    $.extend({ getHtml:function(url,callback){ $.ajax({ dataType:"html", url:url, timeout:1500 ...

  3. NAS与SAN RAID

    存储区域网络 SAN 存储区域网络(Storage Area Network,简称SAN)采用网状通道(Fibre Channel ,简称FC,区别与Fiber Channel光纤通道)技术,通过FC ...

  4. Jenkins自动化CI CD流水线之6--构建邮件状态通知

    一. 前提 前提: 服务器开启邮箱服务: 二. 基础配置 需要安装一个插件: 插件: Email Extension Plugin 进行配置: 系统管理->系统设置-> 相关配置如下图: ...

  5. appium ios 真机自动化环境搭建

    近期由于工作需要,本小菜在弄appium+ios+iphone真机的移动自动化,在网上找寻各种资料,发现针对IOS方面的资料少之又少,公司其它部门的弄过的同事也寥寥无几,即使有,也是安卓方面的.本次书 ...

  6. java中double的四舍五入 BigDecimal

    转载:https://blog.csdn.net/xiaobing_122613/article/details/71077225 1. 功能 将程序中的double值精确到小数点后两位.可以四舍五入 ...

  7. delphi 与 java 兼容的 MD5

    function GetMd5(AValue : string) : string; var md5 : TIdHashMessageDigest5; bytes,byte1 : TBytes; be ...

  8. GM MDI Tech 3 VS GM tech 2

    Many customers ask for this question: what is the difference between GM tech 2 and GM MDI Tech 3 sca ...

  9. 1.1 Go安装与项目结构初始化

    软件安装安装包下载地址为:https://golang.org/dl/ 如果打不开可以: https://golang.google.cn/dl/ https://dl.google.com/go/g ...

  10. ubuntu hadoop集群 master免密码登陆到slave节点

    1. 在master节点上安装ssh client,在slave节点上安装ssh server sudo apt-get install openssh-client sudo apt-get ins ...