Stack Exchange Network Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange
Gitã§ã®éçºã§ããããªä½é¨ã¯ããã¾ãããï¼ 3ã¤åã®ã³ãããã®ã¡ãã»ã¼ã¸ã«ãã¹ããã£ããä¿®æ£ãããã»ã»ã» ãã®ã³ãããã®é çªå ¥ãæ¿ããããªã ãã®ã³ãããããã³ãã¯è¦ããªãã£ãããåé¤ããããªã â¦â¦ å®ã¯ããGitã§ã§ãããã§ãï¼ä»åã¯Gitã¯ã©ã¤ã¢ã³ãã½ããã®Source Treeã½ã¼ã¹ã»ããªã¼ã§ã³ããããã°ãä¿®æ£ãã便å©ãªæ©è½ãrebase interactiveãªãã¼ã¹ã»ã¤ã³ã¿ã©ã¯ãã£ããã解説ãã¾ãã ã³ãããã®åç·¨éãã§ããæ©è½ã¨ã¯ï¼ Gitã§ã¯ã³ããããåç·¨éããæ©è½ããgit rebase interactiveãã¨ããã¾ãããã¨ãã°ãã³ãããã®å ¥ãæ¿ããç·¨éãçµ±åãåé¤ãã§ãã¾ããæ£ç¢ºã«èª¬æããã¨ãã³ããããã®ãã®ãç·¨éããã®ã§ã¯ãªããæ°ããã³ãããã®ã³ãã¼ãä½æãã¦1ã¤ãã¤ã³ããããçµã¿ç«ã¦ãæ©è½ã«ãªãã¾ãã Source Treeã§ã³ããããã°ãç·¨éããã Sour
ãã®æ稿㯠10å¹´å åã«å ¬éããã¾ããããã¾ã§ã¯ããç¡å¹ã«ãªã£ãå 容ãå«ãã§ãããããããªããã¨ããäºæ¿ãã ããã WP-Dã¨ããããã°ãããã¾ãã¦ããã¡ãã§2ã¶æã»ã©åã«ãããFTPãå©ç¨ãããã¨ã¯æ¢ãã¦ãGitã使ããããã®ã»ããã¡ãªãããå¤ããã¼ã ã¨ããè¨äºãã¯ã¦ãªããã¯ãã¼ã¯ã§ãããã³ããªå ¥ãããã¨ãããã¨ãããã¾ããã ãã³ã¡ã®åå¿ãã¾ã¨ããã¨â¦â¦ DevOpsã¨ããã£ã¦ãã®ã«ä¸éã¯ã¾ã ãã®ã¬ãã«ãå«ã«ãªã㪠FTPã¨Gitã£ã¦éãããããä½è¨ã£ã¦ãã® ãµã¤ãã®ç®¡çãGitã§ã§ãããããªãããã ã¨ããæãã§ããã ãã®è¨äºãæ¸ããã¡ã¬ãããã¯ãã¶ã¤ãã¼ï¼ãã£ã¬ã¯ã¿ã¼åºèº«ã§é»ãç»é¢ãåå¼·ä¸ãè¨è足ãããªé¨åã¯ãã£ãã¨æãã¾ããããããã®å¿ãªããã³ã¡ãèªã¿ã大å¤å·ã¤ãã¾ãããããã¦å·å¿ã®ãã¾ã失踪ãæ¸è°·ã»ã«ãªã¢ã³ã¿ã¯ã¼ã®å±ä¸ã§ã«ã©ã¹ã«ã¤ãã°ã¾ãã¦ããç¡æ¨ãªè ä¹±æ»ä½ã¨ãã¦çºè¦ãã
ã¯ããã« gitã¯ã³ããããã¨ã«ã¬ãã¸ããªå ã®ãã¡ã¤ã«å ¨ã¦ãã¹ãããã·ã§ããã¨ãã¦ä¿åããã¨ãããªãã㪠è¨è¨ã«ãªã£ã¦ããã ãããgitã®ä¾¿å©ãã®æ以ãªã®ã ãç»åãã¼ã¿ãé³å£°ãã¼ã¿ã®ãããªãã¤ããªãã¼ã¿ãæã¨ãã¨ãã㨠å°ãã®å¤æ´ã§ããã®ãã³ã«ã³ãã¼ãçãã¦ãã¡ã¤ã«ãµã¤ãºåã®å®¹éãå¢ãããã¨ã«ãªãããã£ã¨ããéã«ã¬ãã¸ããªã è¥å¤§åãã¦ãã¾ãã ç¹ã«å¦ç¿çµæããã¡ã¤ã«ã«ä¿æãã¦ãã¹ãçã«ä½¿ãã¾ãããããªããã°ã©ã ã管çãããã¨ãã㨠ã¢ã«ã´ãªãºã ã®ãã©ã¡ã¼ã¿ãå°ãå¤ãããã³ã«100kBè¿ã容éãå¢ãã¦ãããå®ã«ã¤ã±ã¦ãªãã æ®éãªã.gitignoreã«*.xmlã¨æ¸ãã¦ãã¼ã¿èªä½ã¯æå管çããããã·ã³ããªãã¯ãªã³ã¯ã«ãã¦å¥ãã£ã¬ã¯ããªã«ç½®ãã¦ããã ãrsyncã§åæããããã«ããããããã ã éå»ã®å®é¨æã®ç¶æ ã«æ»ããªãã£ãããæ¯årsyncããã®ã¯ä¸ä¾¿ã ã£ãã ãªããç¡ãããªã¼ã¨æã£
ãããããã¯ä¼æ¥ã§ä½¿ãããã§ããï¼ ä¼æ¥ã«ãã£ã¦ã¯å¤é¨ã«ã½ã¼ã¹ã³ã¼ããé ããããªããããèªç¤¾ã§Gitãµã¼ããæ§ãã¦ããã¨ãããå¤ãã§ããããããããããªãã¨ç®¡çç»é¢ã欲ãããªãã¾ããGitHubã®ç®¡çç»é¢ã¯åªç§ã§ããããã£ãWebãã©ã¦ã¶ä¸ã§ãªãã¸ããªã®æ å ±ãè¦ããã¨æãã¯ãã§ãã ããã§ä½¿ã£ã¦ã¿ã¦æ¬²ããã®ãGitonomyã§ãããã¶ã¤ã³ã®æ ¼å¥½ãããGitãªãã¸ããªããã¼ã¸ã£ã§ãã Gitonomyã®ä½¿ãæ¹ Gitonomyã¯PHP + Symfonyã®çµã¿åããã§ä½ããã¦ãã¦ãWebãã©ã¦ã¶ä¸ã§Gitãªãã¸ããªã®æä½ãä¸éãã§ããããã«ãªã£ã¦ãã¾ããã¦ã¼ã¶ã¯ããã¸ã§ã¯ãåä½ã«ã°ã«ã¼ãã«å ¥ããããã§æ¨©é管çãããä»çµã¿ã§ãã ã½ã¼ã·ã£ã«æ©è½ã¯ããã¾ããããä¼æ¥ã¦ã¼ã¹ã§ããã°ååã§ã¯ãªãã§ããããã社å ã§Gitãµã¼ããç«ã¦ã¦ããå ´åã¯ãã²å°å ¥ãæ¤è¨ãã¦ã¿ã¦ãã ããã Gitonomyã¯PHP
ä½ãï¼ git commitã®ãªãã·ã§ã³--allow-emptyãåç¥ã§ããããï¼ ããã¯ããªãã·ã§ã³ã®ååã®éã空ã®ã³ãããã®ä½æã許å¯ãããªãã·ã§ã³ã§ãã é常å¤æ´ããªãã¨ã³ããããä½ããªãããã«ãªã£ã¦ãã®ã§ 空ã³ããããä½ãã«ã¯ãã®ãªãã·ã§ã³ãæå®ããå¿ è¦ãããã¾ãã add(ãããã¯rm)ãããªã(stageã«ä½ãè¼ããªã)㧠commitããã¨ãã®æ³¨ææã«ã¯ç»å ´ããã®ã§ç¥ã£ã¦ã¾ããã使ã£ã¦ã¾ããã§ããã æè¿ãéçºããã¼ã®ä¸ã§ä½¿ãéãæãã¤ãã¦ä½¿ãããã«ãªã£ãã®ã§ç´¹ä»ã§ãã ãã®1 空Pull Requestä½ãã ãã«ãªã¯ã£ã¦ãåºæºã«ãªããã©ã³ãããå¤æ´ãããã³ãããããªãã¨ä½ããªãã¨æã£ã¦ã¾ãã ã§ããå¤æ´ã¯ãªããã ãã©ãã«ãªã¯ã®commentã«å¤æ´ã®ãæ¦è¦ããç®çãããã¸ãã¹ã¤ã³ãã¯ãããã©ã®æ°å¤ãæ¹åããã®ãããªã©è²ã ããã«æ¸ãã¦ãããããã¨ã¨ãããã¾ããã èãã¦ãå
ã¡ãããã¿ã§ããã¡ããã©Gitã§ç¹å®ã³ãããã®ãã¡ã¤ã«ã ããzipã§ç´åããå¿ è¦ããã£ãã®ã§ã gitï¼ç¹å®ã³ãããã®ãã¡ã¤ã«ä¸å¼ãæ½åºï¼zipä¿åãã¯ã³ã¯ãªãã¯ã§ã | ã©ã¹ã¿ãã¿Pããã ãã¨ã¦ãåèã«ããã¦ããã ãã¾ããããã¡ãã£ã¨å¤æ´ããã®ã§ã¡ã¢ä»£ããã«æ¸ãã¦ããã¾ãã ãããªã³ããããã°ããã£ãã¨ãã¦ã $ git log --oneline --graph * c000004 ã³ããã4 * c000003 ã³ããã3 * c000002 ã³ããã2 * c000001 ã³ããã1 ãã³ããã2ããã³ããã3ã¾ã§å¤æ´ãã¡ã¤ã«ã ãããã ãããã¨è¨ããããã以ä¸ã®ããã«ããã°OKã§ãã $ git archive --format=zip c000003 `git diff c000003..c000001 --name-only` -o ~/Desktop/c000003.zip
ãã¡ã¤ã«ç·¨éãã³ã³ããªã¯ãããå ´å ä¸è¨ã¯ããããï¼å¿ã ããï¼ã³ã³ããªã¯ãç»é¢ã§ããã çããã¯ã³ã³ããªã¯ãã®mergeã¯ã©ããªæ¹æ³ã§ãã£ã¦ãã¾ãã§ããããï¼ vimãemacsã§ç´æ¥ç·¨éãã¦ããæ¹ãå¤ãã¤ã¡ã¼ã¸ã§ãããå®ééãã¦ã¿ãã¨ãä¸è¨ã®ããã«å·®åã表示ããã¦ããã¨æãã¾ãã ãã®ç»é¢ãè¦ãã ãã§ã¯ã©ã®ããã«mergeããã°ããã®ããããã¾ãããï¼Objective-Cã®ARC/MRCåæ¹ã®éçºçµé¨ããã人ã¯ç®ãã¤ã¶ã£ã¦ãã ããã»ã»ï¼ gitã«ã¯ãã®ãããªã³ã³ããªã¯ãã®mergeãæ¯æ´ããgit mergetoolã³ãã³ããæè¼ããã¦ãã¾ãã ãã®ã¾ã¾Enterãã¼ãæ¼ãã¨ä¸è¨ã®ãããªç»é¢ãç«ã¡ä¸ããã¾ãã ç»é¢å¹ ã®é½åã§ãã©ã³ããå°ããã®ã§ãããããã§ãmergeãããå·®åãä½ãããç´åã®ç¶æ ãã¨ãmergeãããå·®åãã«æ³¨ç®ãã¦ã¿ã¾ãã ãã®2ã¤ãè¦æ¯ã¹ãã¨ã@propertyã®
Gitã¯ä¾¿å©ãªä»çµã¿ã§ããä¾ãã°Gitãªãã¸ããªãããããã¤ã§ããä»çµã¿ã使ãã°SCPãªã©ã§ãã¡ã¤ã«ãã¢ãããã¼ãããå¿ è¦ãããã¾ãããã¨ã¦ã便å©ã§ããããããããã£ãæ¹æ³ã®åããªãã¬ã¬ã·ã¼ãªéç¨ãä½åãªãããã¦ããç°å¢ãããã§ãããã ä¾ãã°FTPã使ã£ã¦ããå ´åãGitãªãã¸ããªã«ã³ããããã¦ããã¡ã¤ã«ã¢ãããã¼ãã¯FTPã¯ã©ã¤ã¢ã³ãã§è¡ãã¨è¨ã£ãé¢åãªã¹ã¿ã¤ã«ã«ãªãã¾ããããã解決ãã¦ãããã®ãGit-ftpã§ãã Mac OSXã§ããã°ã¤ã³ã¹ãã¼ã«ã¯ç°¡åã§ãbrewã§è¡ãã¾ããDebianãUbuntuã§ãaptã使ã£ã¦ã§ãã¾ããWindowsã®å ´åã¯Cygwinã使ã£ã¦è¡ãå¿ è¦ãããã¾ãã $ brew install git-ftp ã¤ã³ã¹ãã¼ã«ãçµãã£ããããã¼ã«ã«ã®ãªãã¸ããªã«ç§»åãã¦initãµãã³ãã³ããå®è¡ãã¾ãã $ git ftp init -u <user> -p
ä¸è¨ã®ä¾ã®å ´åãå¤æ´ããç®æãè¿ãããåãhunkï¼å¤æ´ã®å¡ï¼ã¨ãã¦è¡¨ç¤ºããã¦ãã¾ããã§ãã®ã§ãhunkãããã«åå²ããå¿ è¦ãããã¾ãããã®ããã«ã¯sãé¸æãã¾ããããããã¨æ¬¡ã®ãããªè¡¨ç¤ºã«ãªãã¾ãã Split into 2 hunks. @@ -1,5 +1,5 @@ <ul> <li><a href="/">Home</a></li> - <li><a href="/about.html">About</a> + <li><a href="/about.html">About</a></li> <li><a href="/help.html">Help</a></li> </ul> Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? å¤æ´ãåå²ããã¦éãã¿ã°å¿ãã ãã®å¤æ´ã表示ããã¦ãã¾ããããã§yãæ¼ãã¦ãã®å¤æ´ãã¹ãã¼ã¸ã³ã°ãã¾ããããã¨æ¬¡ã¯ä»¥ä¸ã®è¡¨
åæ£ãã¼ã¸ã§ã³ç®¡çãè¯éºã«æ±ãããå å£ã§ãã GREE Advent calendar 2013 ã® 14 æ¥ç®ã¨ãã¦åå ããã¦ããã ãã¾ãã ãäºäººã«ç¶ã Haskell ã®è©±ãããããã¨æã£ãã®ã§ãããæ¥é½ç¡é£ãªéçºã®è©±ã«å¤æ´ãã¾ãã :o Java ã C++ ã«ã¯ OOP ã®æ¦å¿µãå¿ è¦ã§ãã£ãããã«ãåæ£ä½æ¥ã®èªèãèãã¾ã¾ git ã Mercurial ã使ããã¨ã¯é·æçã«ä¸å¹¸ãããããã¾ãã ã¨ããããã¸ã§ã¯ãã«ã¦ããã®ä¸é¨ãå¯ç£ç©ã®ããã«ã¦ã§ã¢ã¨ãã¦æ½åºãã¹ããã¢ããªã±ã¼ã·ã§ã³ã¨åé¢ããã ä¸å ·åããã£ãã®ã§åå ãæ¢ãããããä¾åé¢ä¿ãè¤éãããã®ã§ã³ã¼ããèªãéãæ¸ãããã ãã¹ããã¬ãã¥ã¼ãææ¡ããªãã¡ã¯ã¿ã®éç¨ãå¼·åããã ããã®ããã¸ã§ã¯ãã«è¿·æãæããªãããã«ãããã®ãã¼ã«ãæ¹è¯ãã¦ä½¿ãããã ãã¾ã¾ã§ä½æ°ãªãããããªããã ãããã¨æã£ã¦æéãããã¦ãã¾ããã§ãã
diff --git a/git-add.md b/git-add.md index 356ee59..dbf3428 100644 --- a/git-add.md +++ b/git-add.md @@ -1 +1,5 @@ # git-add + +- add line-a +- add line-b +- add line-c ã£ã¦ããå¤æ´ããã£ãã¨ãã¦ãé常ãªãå ¨é¨ã³ãããããããvimã§éãã¦ç·¨éãã¦å¥ã®ã³ã³ã½ã¼ã«ã§ã³ãããããå¾ãç·¨éããã¼ã«ããã¯ããã¨ããããããã¢ããã°ãªæãã®ãã¨ããããªãããããªãããå®é俺ãæåã®é ã¯ãããã¦ããã ã¨ãããã©ã£ãããGitã«ã¯ã¡ããã¨ãããåé¿ããæ¹æ³ãããã 試ãã«git add . -pãã¦ã¿ãããããã¨ã以ä¸ã®ããã«è¡¨ç¤ºãããã¯ãã ã diff --git a/git-add.md b/git-add.md index 356
ååã¨ã¯è¨äºãåãããã¨ã«ãããé·ããªãããã ä»åã¯ãã ãã§ããã£ããã¨ãããã§ãããããããã¡ãã3ã¤åã®ã³ãããã«typoè¦ã¤ãã¡ãã£ããï¼ï¼ãã«å¯¾å¿ããã ããããã¯ããã¤ããããä¾ãã°ãæåã«æãã¤ããããªãã¨ãã ãã®ã³ãããã¾ã§git resetãç¹°ãè¿ãã¦ãç·¨éãã¦ãããä¸ågit commitãã¦ãã ã§ãããã ãã©ãåã®ç·¨éå 容ãè¦ãã¦ãªãããããªããããGitã使ã£ã¦ãããã«ãçãªã¢ããã°æãæããããããªãâ¦â¦ã®ã§ããã£ã¨ä¸æãæ¹æ³ã¯ç¡ãã®ãã ããã iã¯interactiveã®ãã¨ã ãå¤åãman git-rebaseãã¡ããã¨èªãã°æ¸ãã¦ããã®ãããããªããè±èªã ãã©æ°ã«ãªã人ã¯èªãã§ã¿ã¦æ¬²ããã ã§ããã®ã³ãã³ããä½ãã§ããã®ãã試ãã«ãã£ã¦ã¿ããã git log --onelineãããããããªæãã®ãã°ããã£ãã
pull request ãå©ç¨ããéçºã¯ã¼ã¯ããã¼ã®è©±ãã§ãããããã¾ããã«ãªã®è©±ããã¦ãªãããã³ã¼ãã¬ãã¥ã¼çãªã話ããå¤ãã§ãâ¦ã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}