git branch 相关命令
创建新的branch:
git branch iss53
切换到一个branch:
git checkout iss53
查看所有本地branch:
git branch
比较两个branch(Head):
git diff branch1 branch2
重命名branch:
git branch (-m | -M) [<oldbranch>] <newbranch>
复制branch并重命名
git branch (-c | -C) [<oldbranch>] <newbranch>
删除branch:
git branch (-d | -D) [-r] <branchname>
舍弃修改:
git checkout -f
This will discard any local changes which are not committed in ALL branches and master.
With a -m or -M option, will be renamed to . If had a corresponding reflog, it is renamed to match , and a reflog entry is created to remember the branch renaming. If exists, -M must be used to force the rename to happen.
The -c and -C options have the exact same semantics as -m and -M, except instead of the branch being renamed, it will be copied to a new name, along with its config and reflog.
With a -d or -D option, will be deleted. You may specify more than one branch for deletion. If the branch currently has a reflog then the reflog will also be deleted.
Use -r together with -d to delete remote-tracking branches. Note, that it only makes sense to delete remote-tracking branches if they no longer exist in the remote repository or if git fetch was configured not to fetch them again. See also the prune subcommand of git-remote(1) for a way to clean up all obsolete remote-tracking branches.
git branch 相关命令相关推荐
- git branch相关命令
[git branch 分支名]创建分支: [git branch]查看本地分支: [git branch -r]查看远程分支: [git branch -a]查看本地和远程分支: [git bran ...
- Git npm相关命令
Git 相关命令 查看用户名和密码 配置用户名和密码 查看git项目远程地址 添加git远程仓库 查看提交记录 查看已有tag 打标签 在某次提交记录上打标签 推送标签到远程 推送单个指定tag到远程 ...
- git branch 分支命令图文详解
git branch 分支命令详解 git branch (查看本地分支) git branch -r (查看远程分支) git branch -a (查看所有分支) git branch < ...
- git的一些简单命令(git clone,git branch,git checkout。。。)
1.git clone 命令 $ git clone <版本库的网址> 比如,克隆jQuery的版本库. $ git clone https://github.com/jquery/jqu ...
- git branch 分支
Git自学之路(四)- git branch 分支 几乎所有的版本控制系统都以某种形式支持分支. 使用分支意味着你可以把你的工作从开发主线上分离开来,以免影响开发主线. 在很多版本控制系统中,这是一个 ...
- git branch 管理分支(超详细)
这是git操作最大的一块儿,来吧,继续学习. 直至现在为止,我们的项目版本库一直都是只有一个分支 master.在 git 版本库中创建分支的成本几乎为零,所以,不必吝啬多创建几个分支.下面列举一些常 ...
- 【错误记录】Git 使用报错 ( git branch -a 仍能查询到已经删除的远程分支 )
文章目录 一.报错信息 二.解决方案 一.报错信息 之前已经执行 git push origin --delete feature1 命令 , 删除了 feature1 远程分支 , 删除操作成功 , ...
- 【Git】Git 分支管理 ( 删除远程分支 | 查看远程分支 git branch -a | 删除远程分支 git push origin --delete feature1 )
文章目录 一.查看远程分支 二.远程分支分析 三.删除远程分支 一.查看远程分支 执行 git branch -a 命令 , 可以查看当前 本地仓库 对应的 远程仓库 的所有分支 ; 远程分支内容 : ...
- 【Git】Git 分支管理 ( 克隆远程分支 | 克隆 master 分支 git clone | 查看远程分支 git branch -a | 克隆远程分支 git checkout -b )
文章目录 一.克隆 master 分支 git clone 二.查看远程分支 git branch -a 三.克隆远程分支 git checkout -b 一.克隆 master 分支 git clo ...
最新文章
- Google 的 Java 编码规范,参考学习!
- 802.11 帧格式及类型
- .net core webapi 列表返回指定的字段_ADO.NET 使用初探之SQL操作 | C# 数据操作系列...
- nginx利用proxy_cache来缓存文件
- python实现数字时钟_Python 写的全屏数字时钟软件,看看还有什么改进的地方
- leetcode-507-Perfect Number
- ugui unity3d 仪表盘_Unity3D---UGUI---UI创建以及Canvas设置
- TextView属性的静态使用与动态使用
- 男生计算机学校,杭州2021年男生读什么计算机学校
- Google 重返中国的忧虑
- 使用echarts3实现散点地图
- python装饰器Decorators
- VMware12序列号
- 设为首页 加入收藏代码
- Leetcode 题解-59题
- 集群搭建系列(八)Kafka
- FCPX:600种VHS Studio转场效果合集
- 自适应变异粒子群matlab,一种自适应变异粒子群优化算法的制作方法
- 洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
- 是谁把我的心情写得如此透彻!
热门文章
- 2020年总结:平安辞旧岁,老牛自奋蹄!
- ES6代码转为ES5代码babel在线转换
- 中级宏观经济学复习范围(马工程)
- 华为台式机擎云W515 PGUV-WBY0安装银河麒麟V10
- jquery ajax,ashx,json用法小结
- input框的输入事件
- 谈谈“数据库中间件”生态与发展
- 【论文笔记】LSNet: Extremely Light-Weight Siamese Network For Change Detection in Remote Sensing Image
- Java Map 接口详解
- 菲尔博士给我们提供提升交际气场的36招