从master分支,从新拉取出一个新的分支,名字为dev,具体命令以下:git
1. 切换到被copy的分支(master),从服务器拉取最新版本服务器
$git checkout master
$git pull
this
2. 从当前分支copy出新的开发分支 命名dev分支orm
$git checkout -b dev
Switched to a new branch 'dev'ci
3. 把新建的分支push到远端开发
$git push origin devrem
4. 拉取远端分支it
$git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> dev
io
pull时发现,当前的分支并无和本地分支关联,根据提示进行下一步:ast
5. 关联
$git branch --set-upstream-to=origin/dev
6. 再次拉取 验证
$git pull