码迷,mamicode.com
首页 > 其他好文 > 详细

git 多人协作

时间:2017-12-25 01:05:47      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:github   详细   out   tor   pst   osi   远程   抓取   log   

1.查看远程仓库;

  $git remote

  $git remote -v 更详细的信息;

  $ git remote -v

  $ git remote -v
  origin  git@github.com:zccxy/Repository.git (fetch) 抓取
  origin  git@github.com:zccxy/Repository.git (push) 推送

2.推送分支;

  git push origin master    origin远程库; master本地分支;

  如果推送失败先用 git pull 抓取远程提交;

  从远程抓取分支,使用git pull,如果有冲突,要先处理冲突

3.在本地创建和远程分支对应的分支,

  $git checkout -b branch-name origin/branch-name,本地和远程分支的名称最好一致;
4.建立本地分支和远程分支的关联

  $git branch --set-upstream branch-name origin/branch-name

 

git 多人协作

标签:github   详细   out   tor   pst   osi   远程   抓取   log   

原文地址:http://www.cnblogs.com/webmans/p/8099687.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!