git 一般用法

在工作的时候通常用 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

posted @ 2017-02-15 14:48  JonasYu  阅读(151)  评论(0编辑  收藏  举报