1.创建分支QtForAndroidV2.0
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (developer)
$ git branch QtForAndroidV2.0
2.查看创建的分支
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (developer)
$ git branch -a
QtForAndroidV2.0
* developer
master
remotes/origin/developer
remotes/origin/master
3.把developer分支合并到新建的分支QtForAndroidV2.0上
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (developer)
$ git merge QtForAndroidV2.0
Already up to date.
4.切换到QtForAndroidV2.0分支
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (developer)
$ git checkout QtForAndroidV2.0
Switched to branch 'QtForAndroidV2.0'
//5.推送到远程分支QtForAndroidV2.0上
//ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (QtForAndroidV2.0)
//$ git push
//fatal: The current branch QtForAndroidV2.0 has no upstream branch.
//To push the current branch and set the remote as upstream, use
//
// git push --set-upstream origin QtForAndroidV2.0
5.推送到远程分支QtForAndroidV2.0上
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (QtForAndroidV2.0)
$ git push origin QtForAndroidV2.0
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: To create a merge request for QtForAndroidV2.0, visit:
...........................
* [new branch] QtForAndroidV2.0 -> QtForAndroidV2.0
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (QtForAndroidV2.0)
$ git checkout developer
Switched to branch 'developer'
Your branch is up to date with 'origin/developer'.
6.切回原来的developer开发分支
ScottChen@ScottChen-PC MINGW64 /e/git/QtForAndroid (developer)
$