当咱们在正常开发过程当中,常常会插进来一些bug修改,为了避免影响在写的代码,须要新开一个分支做为bug修复。git
git clone https://code.xxxapp
git remote -vcode
git branch图片
当我想从远程仓库里拉取一条本地不存在的分支时:开发
git checkout -b 本地分支名 origin/远程分支名rem
这个将会自动建立一个新的本地分支,并与指定的远程分支关联起来。get
git branch yml2.0it
git checkout yml2.0io
orast
git checkout -b yml2.0
将原来:
profiles: active: test
修改成:
profiles: active: prod
git status
git add .
git commit -m 'yml2.0'
git push origin yml2.0
推送成功,同时在远程建立yml2.0分支
数据修改为功