首页 > 其他 > 详细

git和github -3 同步到远程仓库

时间:2015-09-05 17:39:23      阅读:258      评论:0      收藏:0      [点我收藏+]

Git命令

  git remote — 查看远程仓库的名字

     -v — 查看远程仓库对应的地址

     -origin — 远程仓库的名字

  git push 仓库名(默认是origin) 分支(master) — 同步到远程仓库  

  默认:git push origin master

  

  添加新的协作人员

    1. 点+New collaborator,然后Add collaborator

 

  同步更新代码 && 多人协作解决冲突

  git fetch — 从远程拉取数据进行对比,需要手动合并(建议)

     git diff master origin/master — 对比区别(红色表示本地,绿色表示远端)

     git merge origin/master — 手动合并(要去相关文件查看)

  技术分享

  git pull — 从远端拉取自动合并(远端同步到本地分支)

 

  补:切换账号

  git config --global user.name "pingguosky"  设置全局用户名

  git config --global user.email "694195417@qq.com"  设置全局邮箱

  客户端需重新切换

 

git和github -3 同步到远程仓库

原文:http://www.cnblogs.com/zouxinping/p/4783500.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!