git 本地创建分支 并推送到远程新分支 步骤

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4
$ git clone http://*******************/tms.git  连接远程
Cloning into 'tms'...
remote: Counting objects: 22881, done.
remote: Total 22881 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (22881/22881), 15.49 MiB | 11.63 MiB/s, done.
Resolving deltas: 100% (12462/12462), done.

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4
$ cd tms/

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (master)
$ ll
total 20
drwxr-xr-x 1 yh 197121     0  1月 14 09:27 adminClient/
drwxr-xr-x 1 yh 197121     0  1月 14 09:27 adminServer/
-rw-r--r-- 1 yh 197121 12011  1月 14 09:27 settings.xml

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (master)
$ git checkout -b testdev 创建本地分支 并切换本地分支
Switched to a new branch 'testdev'

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$ git branch -a 查看本地 远程分支
  master
* testdev
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev
  remotes/origin/master

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$ git branch  查看本地 分支
  master
* testdev

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$ git pull origin dev  获取远程分支dev 到本地分支 testdev


yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$ git push origin testdev 推送本地分支 testdev 内容到远程分支并创建相同名字远程分支

Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: Create merge request for testdev:
remote:   http://git.spt.com/team/tms/merge_requests/new?merge_request%5Bsource_branch%5D=testdev
remote:
To http://git.spt.com/team/tms.git
 * [new branch]        testdev -> testdev

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$ git branch 查看分支 
  master
* testdev

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$ git branch -a 查看 本地 远程 全部分支情况
  master
* testdev
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev
  remotes/origin/master
  remotes/origin/testdev

yh@DESKTOP-LS9D34M MINGW64 /d/gittest4/tms (testdev)
$

git 本地创建分支 并推送到远程新分支 步骤_第1张图片

git 本地创建分支 并推送到远程新分支 步骤_第2张图片

你可能感兴趣的:(git,git,svn)