在工作的时候通常用 git clone  url 下载一个项目到本地磁盘

当然现在默认是本地的master 分支,如果要创建本地的新分支,并且还要有对应的新分支怎么办呢?

1.git checkout -b new_branch

2.git push origin new_branch

3.

new_branch  代码合并到qas

git pull new_branch

 

git fetch origin master

git merge FETCH_HEAD -m 'from master'

git push

 

git checkout qas

git pull origin qas

git merge new_contract_yuqi -m 'from new_contract_yuqi'

git push

git checkout new_contract_yuqi

 

自己拉自己分支pull 拉别人分支fetch

 

new_branch  代码合并到master

git pull new_branch

 

git  fetch origin master

git merge FETCH_HEAD -m ‘from master

git push 

 

git checkout master

git pull origin master

git merge new_contract_yuqi -m ‘from yuqi

git push

 

git checkout new_contract_yuqi

转载于:https://www.cnblogs.com/xuezizhenchengxuyuan/p/6401406.html

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐