亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

【九月打卡】第14天 項目開發團隊協作-Git

標簽:
Git

第一模块 学习课程

名称: 六大场景 梳理开发痛点 解锁前端进阶路

章节名称: 7-2 项目开发团队协作 --------版本管理

               7-3  关于Git你需要知道的知识点

讲师: Brian

第二模块 课程内容

Git Flow(重点)


模型一、经典模型问题

分支不仅仅针对开发环境、测试环境,有时还要针对用户测试的环境,公测环境,发布release环境

  • 必须使用dev分支

  • 复杂度高: hotfix与release分支

  • 多次merge合并

https://img3.sycdn.imooc.com/6327292300010ed714410833.jpg


模型二、gitlab,github推崇的模型 -- 总结了线型协同的一些好的方式和方法

  • 支持持续集成多环境的场景

  • 上游分支向下游发展

流程: Bug -> New Branch -> master -> pre branch -> Target Branch

该模型适用于版本稳定而且需要小版本更新迭代的场景

https://img1.sycdn.imooc.com/63272c9e0001534014500833.jpg

模型三、vue, react采用的模型

大家都在master上面进行开发,但一旦出现一个需要稳定更新的版本,直接就从master拉版本出来,然后就从这个分支上进行小的bug修复或者其他更改

  • 适用于版本项目

  • 稳定版本从master检出,bug修复在分支

流程: master -> Stable -> new branch -> bug fix -> version

https://img2.sycdn.imooc.com/63272ea60001b3c514490833.jpg

第三模块 课程收获

git使用ssh密钥

可以用ssh-keygen来创建, Window上包含在MSysGit里面

ssh-keygen -t rsa -C "[email protected]"

文件: id_dsa.pub 公钥 id_dsa 私钥


ssh -T [email protected] 验证公钥key是否工作


git remote set-url origin [email protected]:someaccount/someproject.git


第一次使用git push之前,需要对git push进行配置:


git config --global push.default.simple
simple means git push will push only the current branch to the
one that git pull would pull from, and also checks that their
names match. This is a more intuitive behavior, which is why
the default is getting changed to this.

simple方式,只会push你已经从远程仓库pull过的分支,意思是你曾经pull了分支dev,那么当你使用缺省git push时,当前分支为dev,远程分支dev就会收到你的commit。


git config --global push.default.matching 
matching means git push will push all your local branches to the
ones with the same name on the remote. This makes it easy to
accidentally push a branch you didn't intend to.

matching与simple方式的push的区别:

matching会把你所有本地的分支push到远程仓库中对应匹配的分支


git reflog并不像git log去遍历提交历史,它都不是仓库的一部分,它不包含推送、更新或者克隆,而是作为本地提交记录的清单, 简单理解:本地后悔药。


更多Git内容请查看:

https://coding.imooc.com/lesson/514.html#mid=45046

第四模块 学习打卡截图

https://img1.sycdn.imooc.com/632735b60001051710530722.jpg

https://img1.sycdn.imooc.com/632735c30001a96809990781.jpg

https://img3.sycdn.imooc.com/632735d10001007208460469.jpg




點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
JAVA開發工程師
手記
粉絲
0
獲贊與收藏
0

關注作者,訂閱最新文章

閱讀免費教程

  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消