ããæ¥ã
PR ã®å
容ãè¦ãã«ãã¼ã¸ãããã¨ã岡島ï¼ãããã£ã¼ã®ï¼ã¨ããããããç¬ã£ã
— ãã®ãã (@a_know) 2015, 9æ 10
ã¨ãããã¨ã§ãè³å¤©æ°ã«ç¬ã£ã¦ãããã
@a_know ãããã¤ãããªmasterãªãã¸ããªã«ç´æ¥pushãããã¿ã¼ã³ã§ããï¼
— ãã¼ã ãï¼ å代ALF (@soudai1025) 2015, 9æ 10
ã¨ãã話ã«ãªããããã¦ãªãã ãã
@a_know push -fã¨åæ§ãGitã®éç¨ã¢ã³ããã¿ã¼ã³ã¨ãã©ããã«çºããã»ããã§ããã¼ãã#ããã°å¾
ã£ã¦ã¾ã
— ãã¼ã ãï¼ å代ALF (@soudai1025) 2015, 9æ 10
ã¨ããã¯ãªãã«ãªã£ãã®ã§ãæ¬å½ã«å¿
è¦ã¨ãã¦é ãã¦ããã®ãã©ããã¯ã¨ãããã Git / GitHub ã§ã¼ããã¼ãã®è·å ´ã§æ°ãã¤ãã¦ããããªãã¨ãã¾ã¨ãã¦ã¿ãã
ããã
- ããã
- GitHub Flow ã«æ²¿ã£ã¦éçºãã
- åºæ¬çã«å ¨ã¦ã®å¤æ´ããã«ãªã¯ã¨ã¹ãã«ãã
- ãã«ãªã¯ã¨ã¹ãã¯ããä½ãã»ãã¾ãã«æ´æ°ï¼pushï¼ãã
- GitHub ã®å¤ã§èµ·ãããã¨ãã極å GitHub ã«æ®ãããã«ãã
- ã²ã¨ã¤ã®ãã«ãªã¯ã¨ã¹ãã¯ã§ããã ãå°ãããã
- åºæ¬çã«ã»ã«ããã¼ã¸ã¯ããªã
- push -f ã¯å¥ã«ç¦æ¢ã¯ãã¦ããªã
- ç¡çãã¦è±èªã§æ¸ããã¨ã§æå³ãä¼ãããªãã»ä¼ããã«ãããªããæ¥æ¬èªã§ãï½
- ã¾ã¨ã
- é¢é£ã¨ã³ããª
GitHub Flow ã«æ²¿ã£ã¦éçºãã
ã¾ãã¯ããããªã¨ã
ããã«ãã¾ã¨ã¾ã£ã¦ãããã©ã
- master ãã©ã³ãã¯å¸¸ã«ãããã¤ï¼ãªãªã¼ã¹ï¼å¯è½ãªç¶æ ã«ãã
- ä½ãæ©è½ã追å ãããããã°ãä¿®æ£ãããããã¨ãï¼ã¤ã¾ããmaster ã«å¯¾ãã¦ä½ããã®å¤æ´ãå ãããã¨ãï¼ã¯ãå¿ ããã©ã³ããåã£ã¦å¯¾å¿ãã
- master ãã©ã³ãã«å¤æ´ããã¼ã¸ãããããå³ãããã¤ãè¡ãï¼ãããã¯ãèªåã§ãããã¤ãè¡ãããããã«ãã¦ããï¼
ã¨ãã£ããããã¯ãåºæ¬çãªãã¨ã¨ãã¦éµå®ãã¦ããã
åè·ã§ã¯ Git Flow ã§ã®éçºã ã£ããã©ããã¡é¢åãããããã«ä½ãæ©æµããã£ããã¨ããã¨ããã§ããªãæ°ããã¦ããã®ã§ãä»ã®ãã®éçºã¹ã¿ã¤ã«ã¯å人çã«æ°ã«å ¥ã£ã¦ããããã£ã¨å¤§è¦æ¨¡ãªçµç¹ã»éçºã«ãªã£ãããã¾ã話ãéã£ã¦ããã®ãããããªãã
åºæ¬çã«å ¨ã¦ã®å¤æ´ããã«ãªã¯ã¨ã¹ãã«ãã
å
ã»ã©ã®åèãµã¤ãã§ã¯ ãã£ã¼ãããã¯ãå©è¨ã欲ããæããã©ã³ãããã¼ã¸ãã¦ãããã¨æã£ãã¨ãã¯ã ãã«ãªã¯ã¨ã¹ã ãä½æãã
ã¨ãã£ããã©ãã¼ãã®ã¾ããã§ã¯ããã«éããã常ã«ãã«ãªã¯ã¨ã¹ããä½æãã¦ãããã¨ãããã趣å³ã®ã¼ã£ã¡éçºã§ãã£ã¦ãã(´ï¼Ïï¼ï½)
- ãã¡ãããã£ã¼ãããã¯ãæ±ãã¦ããããã§ã¯ãªãã¨ãã§ããä»è ãããã©ã¹ã¢ã«ãã¡ã®å©è¨ããããããã¨ããã
- ãã«ãªã¯ã¨ã¹ãã«ãããã¨ãæèãããã¨ã§ãèªåã®ä¸ã§ä½æ¥å
容ãæ´çãã§ããããã
- ä¾ãã°ãä»äººãè¦ã¦ããã®ç®çãå®ç¾æ¹æ³ãããç¨åº¦ãããããã« description ã title ã工夫ãããã¨ããREADME é§åéçºãã¿ãããªãã®ã«éãããã®ããããã
- éå»ã®ä½æ¥ãä½æ¥åä½ã§åç §ã»ææ¡ãããã
ã¨ãã£ãå¹è½ãããããã«æã£ã¦ããã
ç¹ã« description ã«ã¤ãã¦ã¯ãâã®ãããªæ¸å¼ããããã¨ãå¤ããæãæããã¨ããããã
## ããããã㨠* xxx ã§ããããã«ããã ## ãã£ãã㨠* xxx ã¢ãã«ã« xxx ã¨ããæ¤ç´¢ç¨ã®ã¡ã½ãããä½ã£ã * XxxController ã追å ãã¦ãããããæ¤ç´¢ã§ããããã«ãã ## ãããªãã£ãã㨠* xxx ## 確èªæ¹æ³ 1. xxx 2. xxx 3. xxx ## ãã®ä» * æåçã«ã¯ã確èªæ¹æ³ãã§ç¢ºèªã§ãã¾ãããã³ã¼ãçã«ããããã¨ããããªããã©ãããè¦ã¦æ¬²ããã§ãã ## ãã¼ã¸å¾TODO * [ ] xxx
ãã«ãªã¯ã¨ã¹ãã¯ããä½ãã»ãã¾ãã«æ´æ°ï¼pushï¼ãã
ãã®ãã©ã³ãã§ãããããã¨ãã²ã¨éããããã£ã¦ãããã©ã³ãã pushã»ãã«ãªã¯ã¨ã¹ããä½æããã®ã§ã¯ãªããæåã®ã³ããããããã¿ã¤ãã³ã°ã§å³ push ããã«ãªã¯ã¨ã¹ããä½æããããã«ãã¦ããã人ã«ãã£ã¦ã¯ã空ã³ããããããããä½ã£ã¦ãã«ãªã¯ã¨ã¹ããä½æãã¦ãã人ããããããã¦ãã³ããããç©ã¿å¢ã度㫠push ã
ãããããã¾ã ããããã¦ããªããã«ãªã¯ã¨ã¹ãã®ã¿ã¤ãã«ã«ã¯ããããä½æ¥ä¸ã®ãã®ã§ãããã¨ããããããã [WIP]
ï¼Work In Progressãä½æ¥ä¸ãã¨ããæå³ï¼ãä»ãããã¯ããã«äººã®ç®ã«è§¦ãããããã¨ã§ããã£ã¼ãããã¯ãåãããããã£ã³ã¹ãæ大åãããã¨ããã®ã第ä¸ã®ç®çã ã¨ç解ãã¦ãã
GitHub ã®å¤ã§èµ·ãããã¨ãã極å GitHub ã«æ®ãããã«ãã
ãã¨ãã°âãããªãããã
ãã¼ã ã¡ã³ãã¼å士ã§ç´æ¥è©±ããããã¦è§£æ±ºãããã¨ãããã®ãã¨ãã¡ããã¨ã³ã¡ã³ãã§æ®ããããããããå¤ãã®äººããã®ãã£ã¼ãããã¯ãå¾ãå¯è½æ§ãé«ããããã®å·¥å¤«ã®ã²ã¨ã¤ãã ã¨æãã
ã²ã¨ã¤ã®ãã«ãªã¯ã¨ã¹ãã¯ã§ããã ãå°ãããã
ä½æ¥ããã¦ãã¦ãããããããã® "ç²" ãè¦ã¤ããã¨ãã©ããã¦ããã®å ´ã§å¯¾å¿ãã¦ãã¾ããããªããã©ãããããã£ã¨ææ ¢ãããã²ã¨ã¤ã®ãã«ãªã¯ã¨ã¹ãã§ãã²ã¨ã¤ã®ãã£ã¼ãã£ã¼ã«ãã©ã¼ã«ã¹ããããã«å¿ããããææ ¢ããä½æ¥ï¼è¦ã¤ãã "ç²"ï¼ã¯å¿ãã¦ãã¾ããªããããä»ç®ã«æ¸ãã¦ã«ã³ãã³ã«è²¼ãä»ãã¦ãããããissue ã«ç»é²ããããã¦ãå¿ãã¦ã大ä¸å¤«ãªããã«ãããï¼äººã¯å¿ããçãç©ã§ãããï¼
ã©ããã¦ãããã®ä½æ¥ãé²ããä¸ã§å¿ è¦ãªãã®ã®å ´åã¯ã
- ãã®ãã©ã³ãï¼
A
ã¨ããï¼ããã"ãã®ç²ãç´ãããã®ä½æ¥ãããç®çã®ãã©ã³ãï¼B
ã¨ããï¼" ãããã«åã B
ãã©ã³ããåæ§ã«ãã«ãªã¯ã¨ã¹ãã«ãã- ãã ãããã¼ã¸å
ã¯
A
ãã©ã³ã
ã¨ãããããªæé ãè¸ãã§ä½æ¥ãè¡ãã"ãã«ãªã¯ã¨ã¹ãã«å¯¾ãããã«ãªã¯ã¨ã¹ã" ãä½ãã¤ã¡ã¼ã¸ã
åºæ¬çã«ã»ã«ããã¼ã¸ã¯ããªã
ããã»ã©ã®ãã¼ã¸ã«ã¯ ä»ã®èª°ããã¬ãã¥ã¼ããã¦æ©è½ã«OKãåºãã¦ãããããããªãã¯ã³ã¼ããmasterã¸ãã¼ã¸ãããã¨ãã§ãã
ã¨ãããã©ãã¼ãã®ã¾ããã§ã¯ãåºæ¬çã«ã»ã«ããã¼ã¸ãããªãããã«ããããã¨ãããã¨ã§èªèãåããã¦ããï¼ãã¡ããç·æ¥æçã¯é¤ãï¼ãä¸äººä»¥ä¸ã® LGTMï¼Looks Good To Meï¼ãå¾ãä¸ã§ãèªå以å¤ã®äººã«ãã¼ã¸ããã¦ãããã
ããã®å¹è½ã«ã¤ãã¦ã¯ãã¾ãèãããã¨ããªãã£ããã©ãã¬ãã¥ã¼ãä¿é²ããä»çµã¿ã®ã²ã¨ã¤ã«ãªã£ã¦ããã®ãããªã¼ãã¨æã£ããä»æã£ãã
push -f
ã¯å¥ã«ç¦æ¢ã¯ãã¦ããªã
rebase ããããã㨠push -f
ããå¿
è¦ãåºã¦ãããpush -f
ããã®ã¯ããããããrebase ãããªã㦠merge ããããã«ãããããã¿ãããªè©±ã«ãªã£ããã¨ããã£ããã©ãçµå±ã®ã¨ãããç¹ã« push -f
ã¯ç¦æ¢ãããã¯ãã¦ãªãã
ãã¼ã éçºããã¦ãã¦ãããä¸çªå¿ è¦ã¨ãªãå¯è½æ§ãããã®ã¯ããã¯ããèªåããã©ã³ããåã£ã¦ä½æ¥ããã¦ãããããä»è ã®ä½æ¥ã«ãã£ã¦ master ã«æ´æ°ãå ãããããã«ãã£ã¦èªåã®ä½æ¥å 容ã¨ã³ã³ããªã¯ãããmerge ã§ããªããªã£ããã¨ããã±ã¼ã¹ããªã¨æããã ãã©ã
- ãããã³ã¼ãã¬ãã¥ã¼åãªã
rebase master
push -f
- ã³ã¼ãã¬ãã¥ã¼å¾ã§ãã¨ã¯ãããã¼ã¸ããã ããªãã
merge
ããããã«ãããããã¨ãããããããªã...ãããã¼ãã¯ä»ã¯ããåºæ¬çã«åè
ããªãæ°äººããã¨ã㧠push -f
ãã¾ã ããããã¨ãã人ããã¦ããã®äººã¨ãã¯âã¿ãããªããããããï¼è©±ãããããã©ããããæãã®ã¯ãåç´ã«ã¾ã ãããç解ãããã¦ããªãããããªãã ãããæããããã¨ãã£ã¦å¿é¿ããããããç解ãã¦ä½¿ããããã«æã£ã¦ãããããªã¨ãããï¼
push -f
ããããªã«æããªããGitHub åºæï¼GitLab ã«ãããï¼ï¼ã®æ©è½ã ãã©ãæè¿ãªãªã¼ã¹ããã Protected Branch ã master ãã©ã³ãã«å¯¾ãã¦æå¹ã«ãã¦ããã°ããããã
About protected branches - User Documentation
æå®ãããã©ã³ãã¸ã® push -f
ã CI ããã¹ããªãã¾ã¾ã®ãã¼ã¸ãç¦æ¢ã§ãããã¼ãã®ãã¼ã ã® master ãã©ã³ãã«ããããæå®ããã
2015/09/14 追è¨
id:koseki WIP 㧠PR åºãã¦ãrebase & push -f ã£ã¦ã©ããªãã ããã³ã¡ã³ãã§åç §ããã³ããããæ¶ããå¯è½æ§ãããã£ã¦æµæãããªã¼ãï¼ãã¬ãã¥ã¼åãªããã¾ãããã®ããªã誰ããèªåã®ãã©ã³ãã«ãã¼ã¸ãã¦ãå¯è½æ§ãæ°ã«ãªãã
ã¬ãã¥ã¼ã³ã¡ã³ããã¤ãåãªãrebaseã¯ãããã³ã¡ã³ãã¤ãããrebaseããã¨ç±³æ¶ããã®ã§rebaseã¯ããªãæ´¾ / Gitï¼GitHubï¼ã®éç¨ã§æ°ãã¤ãã¦ããã㨠- ããã®ãã«ã£ã http://t.co/i0RCtRVAUu
— Takafumi Yoshida (@zephiransas) 2015, 9æ 14
ãããã¸ããå¿ãã¦ãã
ã¾ããèªåã®ãã©ã³ãã«èª°ãããã¼ã¸ãã¦ãå ´åãã ãã©ãããããã¼ã è¦æ¨¡ã«ãã£ã¦ã¢ããã¼ããå¤ããã»ããããã¨ã¯æããã©ãã¼ãã®ãã¼ã ã§ã¯ãä»è
ã®ãã©ã³ãã«ãã¼ã¸ãè¡ã£ã人ãã pull
ãã¦ãã ããã¼ãã¨ãããããªã³ã¡ã³ãããã«ãªã¯ã¨ã¹ãã«æ®ãã¹ãã ãããã¨ãããããã®é°å²æ°ãããã
ããã¦ããæ¶ãã¦ãã¾ãã®ããã®ã°ããã³ã¡ã³ããã«ã¤ãã¦ã¯ãåã³ãããã«ã¤ãã¦ã®ã³ã¡ã³ãã¯è¡ãããfile changed ã¿ãã§ã³ã¡ã³ãããããããã«ãªã¯ã¨ã¹ãã«å¯¾ãã¦ã³ã¡ã³ããæ®ãããã«å¿ããã¦ããããããã¦ããã°ã rebase
ãã¦ãã³ã¡ã³ãã¯æ¶ããªããã¯ããï¼ããã§ããã¾ã«ãã£ãããã¡ãããã¨ããããã©ãï¼
ãã¨ãã³ã¡ã³ãã«ç¹å®ã®ã³ãããã®ããã·ã¥ï¼ abc1234
ã¿ãããªãã¤ï¼ãä»è¨ãã¦è¨åãããã¨ãããããã¨ããããã¼ãããããããããã ãã©ããããã«ãã㯠rebase
ããã¡ããã¨ã©ããããããªããªã£ã¡ããã¾ãããï½ãã¡ãã£ã¨èãã¦ã¿ãããã
ç¡çãã¦è±èªã§æ¸ããã¨ã§æå³ãä¼ãããªãã»ä¼ããã«ãããªããæ¥æ¬èªã§ãï½
ã³ãããã³ã¡ã³ãã¨ãã®è©±ãããã¯è³å¦ä¸¡è«ãããããªããã©ã
趣å³ããã°ã©ãã³ã°ã OSS ã¸ã®ã³ã³ããªãã¥ã¼ãã®ããã®ãã®ãªãå¥ã ãã©ï¼å¾è ã®å ´åã¯ãããè±èªãããªãã¨ãããã¨æãï¼ãã¼ãã®ä¼ç¤¾ã®ãããªããã¼ã å ¨å¡æ¥æ¬äººã§ããæ¥æ¬åãã®ãããã¯ããéçºãã¦ãããã®ãªãããã®æå³ããã¼ã å ã«æ£ããä¼ãããã¨ãæåªå ã«ããã¹ãã ã¨æã£ã¦ããããããè¨ã£ã¦ããæ¸ããªãã¨ä¸æããªããªããã¨ããã®ã¯ããã£ã¨ãã ãã©ããã®ç·´ç¿ãæ¥åã§ããã®ã¯ã¡ãã£ã¨éãããããªãããªããã¨ã
ã¾ã¨ã
ã¨ãæåã¯ããããããªãæµãããå§ã¾ã£ã話ã ã£ããã©ãæ¸ãã¦ã¿ãã¨æãã®å¤ãçãé²ãã ãªã¼ï½
ãã¨ããããã£ã¦é å¼µã£ã¦æ¸ãã¦ã¿ããã©ããGitHub å®è·µå ¥éãã«æ¸ãã¦ãããã¨ãã»ã¨ãã©ãã ã£ãããããã¡ããè¦ãã«ã¯æ¸ãã¦ããã ãã©ããã¶ã£ã¦ãã¨ãããå¤ãã£ããã´ã¡ã³ããµã¤ãã§ããããè¯ãæ¬ãªã®ã§ãGitHub ã使ã£ã¦ãã¦ã¾ã èªãã§ãªã人ã¯ãä¸åº¦ã¯èªãã§ãããã»ããããã¨æãã¾ãï¼ï¼
GitHubå®è·µå ¥é ~Pull Requestã«ããéçºã®å¤é© (WEB+DB PRESS plus)
- ä½è : 大å¡å¼è¨
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2014/03/20
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- ãã®ååãå«ãããã° (23件) ãè¦ã
ã¨ãããã¼ããGit ã§ãã¾ãé£ãããã¨ã¯ããªãï¼ã§ããªãï¼ãã ããããæ´å²ãæ±ãããã¨ããã®ãããã¾ãæ°ã«ããªãã¿ãã§ãã¨ã¯ããããããªã«ã¡ãã£ã¡ãã£æ±ãããã§ããªãã¨ã¯æã£ã¦ããã ãã©ãã