git使用简明教程
2024-08-27 08:03:49
1.自己在gitlab.XXX.com创建一个项目
点击右上角的“+”符号,创建新项目。
项目名:xxxtest
2.在master分支提交一个文件Readme.txt
文件内容:
Date: 2016-07-xx
Author: xxxx@XXX.com
说明: homework
git clone ssh://XXX
git add Readme.txt
git commit -m 'add readme.txt'
#此处master为分支名
git push origin master
3.新建分支testing,并推送到gitlab
git branch testing
git checkout testing
#此处testing为分支名
git push origin testing
删除分支操作方式如下:
#新建origin分支
git branch origin
#删除origin分支
git branch -d origin
4.在testing提交文件夹“dir”, 文件夹里须有文件“file1”
mkdir dir
cd dir
touch file1
cd ..
git add ./dir
git commit -m 'add dir'
git push origin testing
5.将testing分支merge到master分支
git checkout master
git merge testing
git commit -m 'merge testing'
git push origin master
最新文章
- 搭建 AngularJS+Ionic+Cordova 开发环境并运行一个demo
- [Linux]cmd to use
- 策略模式(strategy pattern)
- 【C语言】C语言标识符
- javascript工厂模式
- HDU 5701 中位数计数
- Gray码 (格雷码) 【二进制】
- SQL Server 备份的 8 种方法。
- hibernate子查询
- <;当幸福来敲门>;之一些很喜欢的台词收藏
- JavaScript简易计算器
- c#事件的应用
- 章节十一、1-Junit介绍
- nsx-edge虚拟机抓包实践
- (转)java代码发送JSON格式的httpPOST请求
- UnicodeEncodeError: &#39;utf-8&#39; codec can&#39;t encode character &#39;\udce4&#39; in position 1: surrogates not allowed根本解决方法
- Mosaic 前端微服务框架
- 使用IDEA创建Java Web项目并部署
- ERROR: In &;lt;declare-styleable&;gt; MenuView, unable to find attribute android:preserveIconSpacing
- Android基础(五) Service全解析----看不见的Activity
热门文章
- Git:创建远程仓库并推送内容到远程库
- Scheduler &; Task &; Worker &; Thread &; Request &; Session &; Connection of SQL Server
- [LeetCode] 231. Power of Two ☆(是否2 的幂)
- vue 父组件通过props向子组件传递数据/方法的方式
- adb(Android Debug Bridge)安装使用教程
- [转]perftools查看堆外内存并解决hbase内存溢出
- Spring AOP+Log4j记录项目日志
- Spring整合Hystrix
- 使用javassist进行动态编程
- JAVA常识1