社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
mike@win10-001 MINGW64 ~/cookbook/cookbook (master)
$ git branch first-branch
mike@win10-001 MINGW64 ~/cookbook/cookbook (master)
$ git checkout first-branch
Switched to branch 'first-branch'
mike@win10-001 MINGW64 ~/cookbook/cookbook (first-branch)
mike@win10-001 MINGW64 ~/cookbook/cookbook (first-branch)
$ git checkout -b first-branch
mike@win10-001 MINGW64 ~/cookbook/cookbook (first-branch)
$ echo "Change" >> README.md
$ git commit -a -m 'Readme changed'
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory.
[first-branch dc7b6d5] Readme changed
1 file changed, 1 insertion(+)
mike@win10-001 MINGW64 ~/cookbook/cookbook (first-branch)
$ git push -u origin first-branch
Counting objects: 3, done.
Writing objects: 100% (3/3), 262 bytes | 131.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: To create a merge request for first-branch, visit:
remote: http://gitlab.aishangwei.net/root/cookbook/merge_requests/new?merge_request%5Bsource_branch%5D=first-branch
remote:
To gitlab.aishangwei.net:root/cookbook.git
* [new branch] first-branch -> first-branch
Branch 'first-branch' set up to track remote branch 'first-branch' from 'origin'.
$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
$ git merge first-branch –no-ff
mike@win10-001 MINGW64 ~/cookbook/cookbook (master)
$ git merge first-branch --no-ff
Merge made by the 'recursive' strategy.
README.md | 1 +
1 file changed, 1 insertion(+)
mike@win10-001 MINGW64 ~/cookbook/cookbook (master)
$ git push origin master
Counting objects: 1, done.
Writing objects: 100% (1/1), 223 bytes | 223.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To gitlab.aishangwei.net:root/cookbook.git
53ec2ca..5e1ebdd master –> master
mike@win10-001 MINGW64 ~/cookbook/cookbook (master)
$ git push origin --delete first-branch
To gitlab.aishangwei.net:root/cookbook.git
- [deleted] first-branch
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!