1. 切换到项目所在本地主机的位置1. 切换到项目所在本地主机的位置
mike@win10 -001 MINGW64 ~
$ cd super -git/
2. 确保目前所处在master分支上2. 确保目前所处在master分支上。
mike@win10 -001 MINGW64 ~/super -git/super -git (master)
$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master' .
3. 创建分支awesome-feature,并切换到该分支上。
mike@win10- 001 MINGW64 ~/super-git /super-git (master)
$ git checkout -b awesome-feature
Switched to a new branch 'awesome-feature'
4. 改变README.md中的内容。
mike@win10 -001 MINGW64 ~/super-git/super -git (awesome-feature)
$ echo "Change" >> README .md
5. 提交4步所做的更改。
mike@win10-001 MINGW64 ~/super-git/super-git (awesome-feature)
$ git commit -a -m 'Added text to readme'
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory.
[awesome-feature 73 fa1f9] Added text to readme
1 file changed, 1 insertion(+), 1 deletion(-)
6. Push分支到Gitlab服务器
mike@win10 -001 MINGW64 ~/super -git/super -git (awesome-feature)
$ git push origin awesome-feature
Counting objects : 3 , done.
Writing objects : 100 % (3 /3 ), 256 bytes | 85.00 KiB/s, done.
Total 3 (delta 0 ), reused 0 (delta 0 )
remote :
remote : To create a merge request for awesome-feature, visit :
remote : http :// c7201.xiodi.cn/root/super -git/merge_requests/new ?merge_request%5 Bsource_branch%5 D=awesome-feature
remote :
To c7201.xiodi.cn :root/super -git.git
* [new branch] awesome-feature -> awesome-feature
mike@win10 -001 MINGW64 ~/super -git/super -git (awesome-feature)
7. 登陆到gitlab服务器
8. 点击Create Merge Request.
9. 根据实际情况填写下面信息。
10. 然后点击提交合并请求。