git branch用法总结
git branch
git branch 不带参数:列出本地已经存在的分支,并且在当前分支的前面加“*”号标记,例如:
#git branch
* master
newbranch
git branch -r 列出远程分支,例如:
#git branch -r
m/master -> origin_apps/m1_2.3.4
origin_apps/hardware/test
origin_apps/m1
origin_apps/m1_2.3.4
origin_apps/master
git branch -a 列出本地分支和远程分支,例如:
#git branch -a
* master
newbranch
remotes/m/master -> origin_apps/m1_2.3.4
remotes/origin_apps/hardware/test
remotes/origin_apps/m1
remotes/origin_apps/m1_2.3.4
remotes/origin_apps/master
git branch 创建一个新的本地分支,需要注意,此处只是创建分支,不进行分支切换,例如:
#git branch newbranch2
#git branch
* master
newbranch
newbranch2
当前的分支依然是master,不进行切换。
git branch -m | -M oldbranch newbranch 重命名分支,如果newbranch名字分支已经存在,则需要使用-M强制重命名,否则,使用-m进行重命名。
git branch -d | -D branchname 删除branchname分支
git branch -d -r branchname 删除远程branchname分支
git branch用法总结的更多相关文章
- Git branch 和 Git checkout常见用法
git branch 和 git checkout经常在一起使用,所以在此将它们合在一起 1.Git branch 一般用于分支的操作,比如创建分支,查看分支等等, 1.1 git branch 不带 ...
- git branch分支管理用法总结
查看分支(远程和本地) 1 查看本地分支: $ git branch 2 查看远程分支: $ git branch -r 3.查看本地和远程分支 $ git branch -a 创建分支 1.创建本地 ...
- Git branch && Git checkout常见用法
https://www.cnblogs.com/qianqiannian/p/6011404.html git branch 和 git checkout经常在一起使用,所以在此将它们合在一起 1.G ...
- Git的用法
Git的用法 Git 的也可以理解为版本控制器.版本控制器(维基的解释):维护工程蓝图的标准作法,能追踪工程蓝图从诞生一直到定案的过程.此外,版本控制也是一种软件工程技巧,借此能在软件开发的过程中,确 ...
- git branch(git 的branch 使用方法)
查看分支: $ git branch 该命令会类出当先项目中的所有分支信息,其中以*开头的表示当前所在的分支.参数-r列出远程仓库中的分支,而-a则远程与本地仓库的全部分支. 创 ...
- Git branch (分支学习)
以前总结的一些git操作,分享在这里. Git 保存的不是文件差异或者变化量,而只是一系列文件快照. - 列出当前所有分支 git branch <--merge> | <--n ...
- git基本用法
基本用法(下) 一.实验说明 本节实验为 Git 入门第二个实验,继续练习最常用的git命令. 1.1 实验准备 在进行该实验之前,可以先clone一个练习项目gitproject ...
- git revert用法以及与git reset的区别
git revert用法 git revert 撤销 某次操作,此次操作之前和之后的commit和history都会保留,并且把这次撤销 作为一次最新的提交 * git revert HEAD ...
- git常见用法介绍
1. git help:帮助 git help xxx git xxx --help 2. git init:初始化 git init 3. git config:配置 常见用法 git config ...
随机推荐
- Python自动化之语法基础
1 第一个程序 hello world 在Linux环境下执行 vim hello.py #!/usr/bin/env python #指定解释器 print("hello world&qu ...
- ajax给全局变量赋值问题解决
$.ajax({ type: "post", //以post方式与后台沟通 url: "./php/chartAjax.php", //与此php页面沟通 da ...
- EXTJS 动态改变Gird 列值
var me = this.getView('EditProProductQrcodePanel'); var grid = me.down("[name=mallQrcodeGrid] ...
- linux中shell截取字符串方法总结
截取字符串的方法一共有八种,主要为以下方法 shell中截取字符串的方法有很多中, ${expression}一共有9种使用方法. ${parameter:-word} ${parameter:=wo ...
- MySQL知识点链接
1.使用ab进行压力测试详解 http://www.365mini.com/page/apache-benchmark. ...
- Vim保存只读模式下的修改
用 vim 打开没有写权限的文件而忘记用 sudo 时,文件变成 read-only这时候用 :w!, SHIFT+ZZ,或者 qw! 都无法保存 :w !sudo tee % :w : Write ...
- 常见的SQL语句
1.select decode(a.xh,'','0','1')||decode(b.xh,'','0','1') from A a left join B b on a.xh=b.xh where ...
- 【leetcode】Word Ladder II
Word Ladder II Given two words (start and end), and a dictionary, find all shortest transformation ...
- Bitmap vs 2Bitmap的实现
[本文链接] http://www.cnblogs.com/hellogiser/p/bitmap-vs-2bitmap.html [题目] 在2.5亿个整数找出不重复的整数,内存不足以容纳着2.5亿 ...
- (转)关于Certificate、Provisioning Profile、App ID的介绍及其之间的关系
转自http://www.cnblogs.com/cywin888/p/3263027.html 刚接触iOS开发的人难免会对苹果的各种证书.配置文件等不甚了解,可能你按照网上的教程一步一步的成功申请 ...