前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >git分支管理

git分支管理

作者头像
零月
发布2018-04-25 15:34:47
5150
发布2018-04-25 15:34:47
举报
文章被收录于专栏:从零开始的linux从零开始的linux

分支管理

代码语言:javascript
复制
查看分支
# git branch
  alex
* master
创建分支
# git branch test
# git branch
  alex
* master
  test
切换分支
# git checkout alex
Switched to branch 'alex'
分支合并
# git merge alex
Updating 1e0b362..22031de
Fast-forward
 1.txt |    1 +
 3.txt |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 3.txt
具体步骤
 vim 1.txt 
# git add 1.txt
# git commit -m "alex fenzhi"
[alex 22031de] alex fenzhi
 1 files changed, 1 insertions(+), 0 deletions(-)
# git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 4 commits.
# git merge alex
Updating 1e0b362..22031de
Fast-forward
 1.txt |    1 +
 3.txt |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 3.txt
 删除分支
 # git branch -d test
Deleted branch test (was 1e0b362).
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2017-06-05,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 从零开始的linux 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 分支管理
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档