Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ããã«ã¡ã¯ã@yoheiMuneã§ãã Gitã使ã£ã¦éçºããã¦ããã¨ãæã èªåã ãgitignoreã«ããããã¡ã¤ã«ãã§ãã¾ãï¼ä¾ãã°ã¨ãã£ã¿ã®ã¡ã¿ãã¡ã¤ã«ã¨ãï¼ããã®ãããªãã¡ã¤ã«ããèªåã®ç°å¢ãããã¼ã¸ã§ã³ç®¡çããå¤ãæ¹æ³ãããã°ã«æ¸ãããã¨æãã¾ãã ç¹å®ã®ããã¸ã§ã¯ãã«ããæå®ãããã¡ã¤ã«ããèªåã ãgitignoreããã æ²é¡ã®ãããªå ´åã«ã¯ã.git/info/excludeã®ãã¡ã¤ã«ã«ãã¼ã¸ã§ã³ç®¡çå¤ã«ããããã¡ã¤ã«ãæå®ãã¾ãã # .git/info/exclude my-gitignore-target.txt ããã¨ããã¡ã¤ã«ãGitã¬ãã¸ããªä¸ã«è¿½å ãã¦ãããã¼ã¸ã§ã³ç®¡ç対象å¤ã«ãªãã¾ãã # ãã¡ã¤ã«ã追å ãã $ touch my-gitignore-target.txt # ãããããã¼ã¸ã§ã³ç®¡ç対象ã«å ¥ããªã $ git status # On bran
Welcome to the Git version control system! Here we will briefly introduce you to Git usage based on your current Subversion knowledge. You will need the latest Git installed; There is also a potentially useful tutorial in the Git documentation. This page is not maintained anymore! The up-to-date version of this tutorial is the GitSvnCrashCourse page at the Git wiki. The copy below might be better
ä¾ãã°ä»¥ä¸ã®ããã«ãã¼ã«ã«ã«gitã§ç®¡çãã¦ãã¦ããµã¨githubãããã§å ¬éããããªã£ãã¨ãããã¯ããããgithubã«ã¬ãã¸ããªãæã£ã¦ããå ´åã¯ãããã $ git clone ãã¦ããã¼ã«ã«ã§ãã«ããã«ãã㦠$ git push ããã°ããã®ã ãã©ããã®é çªãéã®å ´åã $ git init $ git add . $ git commit -m "initial commit" ... ããã§ããã¼ãgithubã«pushããããªã¼ã¨ãµã¨æãã ããããã«githubã«sign inãã¦repositoryãnewãããä»®ã«ã¦ã¼ã¶åãuser-nameã§ãªãã¸ããªãrepositoryã¨ããã®ãä½ã£ãããã¨ããã¼ã«ã«ããã®pushã¯ä¸è¨ã®ãããªæãã«ãªãã $ git remote add origin git@github.com:user-name/repository æ
git dtã³ãã³ã - razokulover publog ãè¦ã¦èªåãgitã®ã³ãã³ããã«ã¹ã¿ãã¤ãºãã¦ãã®ãæãåºããã®ã§æ®æ®µãã使ã£ã¦ããã®ãç´¹ä»ãã¾ãã 対象è ä½æ¥éä¸ã¯tmpã³ããããããããä½ã£ã¦ãæå¾ã« git rebase -i ã§ã³ããããæ´ãã¦ãã人 åç½®ã gitã®ã¿ã¤ãæ°ãæ¸ãã gitã³ãã³ãã使ãæã«æ¯å git ã¨3æåã¿ã¤ãããã®ã¯æéã®ç¡é§ãªã®ã§ã¨ã¤ãªã¢ã¹ã¤ããã®ããããããã¾ã ~/.bash_profile ã¨ã ~/.bashrc 辺ãã«ä¸è¨ãæ¸ãã¾ãã alias g='git' ãã㧠g ã ãã§gitã³ãã³ãã使ãã¾ã git-now iwata/git-now tmp ã³ãããã®ããã®ç¬èªãµãã³ãã³ã git-now - ã¢ã¸ã£ã¤ã«SEãç®æãããã° æéã§tmpã³ãããããããã®ã³ãã³ããMacãªã brew install git-
gitã使ãã¨ãããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ããhtmlææ¸ã®å¤æ´å±¥æ´ããããã¯ã¢ããçã主ã«ããã¹ããã¡ã¤ã«ãä¸å¿ã«ãã¡ã¤ã«ã®ãã¼ã¸ã§ã³ç®¡çãã§ãã¾ããããã¦ããªã¢ã¼ããµã¼ãã«gitã®å ±æãªãã¸ããªãä½æãã¦ããã°ãè·å ´ã®ãã½ã³ã³ãèªå® ã®ãã½ã³ã³ããèªç±ã«ã¢ã¯ã»ã¹ã§ãã¦ä¾¿å©ãªãã§ãããåæã¨ãã¦ãèªç±ã«ãã°ã¤ã³ãã¦ä½¿ããã¬ã³ã¿ã«ãµã¼ãçã®ãªã¢ã¼ããµã¼ããæã£ã¦ããå¿ è¦ãããã¾ããGitHubã«ç¡æã¢ã«ã¦ã³ããä½ã£ã¦ç®¡çããæ¹æ³ãããã¾ãããGitHubã¯åºæ¬çã«å ¬éãåæãªã®ã§ãä»äºçã§ä½¿ããã¡ã¤ã«ã®ç®¡çã«ä½¿ãã«ã¯é£ããã§ãã(ææãã©ã³ã使ãæãããã¾ãã) ããã§ãç¡æã§2GBã®å®¹éã使ãããDropboxãgitã®å ±æãªãã¸ããªã«ããæ¹æ³ãããã¾ãã以ä¸ã®æä½ã¯Macã§ã®å ´åã§ãããWindowsçã§ãgitã使ããç°å¢ãããã°åãããã«ã§ããã¨æãã¾ãã ã¾ããDropboxã®ãã£ã¬ã¯
ããã«ã¡ã¯ãã¨ã³ã¸ãã¢ã®çã§ããä»åã¯ãGitåå¿è ãæ©ã¾ãããªãã¼ã¹ã«ã¤ãã¦è§£èª¬ãã¦ã¿ããã¨æãã¾ãã ãªãã¼ã¹ãåè³ ãªãã¼ã¹ãèãããã¨ã¯ãããã©ã使ã£ã¦ããªã ä¸å®ãæ±ããªãããããªãã¼ã¹ããªãã¨ãªã使ã£ã¦ãã ä¸è¨ã«å½ã¦ã¯ã¾ãæ¹ã¯ããã²èªãã§ãã ãããã ãªãã¼ã¹ã§ä½ãã§ããï¼ ã³ãããã綺éºã«ãªãï¼ã以ä¸ã§ãï¼ããã®ä¸è¨ã«å°½ããï¼ å ·ä½çã«ã©ã®ããã«ç¶ºéºã«ãªããã¨ããã¨â¦â¦ ã³ãããå±¥æ´ããããããããªã ã³ãããã¡ãã»ã¼ã¸ãå¾ããå¤ãã ã³ãããã®é åºãå¾ããå¤ãã 2ã¤ä»¥ä¸ã®ã³ãããã1åã«çµ±åãã ä¸åº¦ã³ãããããå 容ãç·¨éãã ã¨ãã£ãå ·åã§ããããï¼ãæ´çæ´é ã好ããªæ¹ã¯ããã²ãªãã¼ã¹ã使ãããªãã¦ããã ãããã¨æãã¾ãï¼ ãã¼ã¸ã¨ãªãã¼ã¹ 2ã¤ã®ãã©ã³ãã®å¤æ´ç¹ãçµ±åããã¨ããGitã®æãä¸è¬çãªããæ¹ã¯ããã¼ã¸ã¨ãªãã¼ã¹ã使ããã¨ã§ãããã¼ã¸ã¯ååã§èª¬æããã®ã§ã
Heroku Advent Calendar 2014ã®13æ¥ç®ã®è¨äºã§ãã 2014å¹´11æã«HerokuããDropbox Syncæ©è½ã®ã¢ãã¦ã³ã¹ï¼Betaçï¼ãããã¾ãããä»æ¥ã¯ããã使ã£ã¦ã¿ããã¨æãã¾ãã ãã®è¨äºã¯Betaæ©è½ã«ã¤ãã¦è§£èª¬ãã¦ãã¾ããæ©è½ã«é¢ãã¦ã¯å¤æ´ã®å¯è½æ§ãããã¾ãã ãã¶ã¤ãã¼ã¨ããã㤠ã¾ãå ã«ç§ã¨Herokuã¨è¨ãã°ãStyleStatsã¨ããCSS解æãã¼ã«ãHerokuä¸ã§åããã¦ãã¾ããç§ã¯å ã¯Webãã¶ã¤ãã¼ã§ããã®ã§ãã¤ãæè¿ã¾ã§ããããã¤ï¼ãªã«ããï¼ããããã®ï¼ãã£ã¦æãã§ããããgit push heroku masterã§ãããã¤ã§ããHerokuããã®ãããã§ããããªç§ã§ãWebã¢ããªã稼åã»éç¨ãã¦ããã¦ãã¾ãã é åãããé ç½®ãããå±éãããé ç½®ã«ã¤ãããªã©ã®æå³ãæã¤è±åèªã ã½ããã¦ã§ã¢ã®åéã§ãéçºããã½ããã¦ã§ã¢ãå©ç¨ã§
以ågitã§ä¸åº¦è¡ã£ãå¤æ´ããªãã£ããã¨ã«ããæ¹æ³4ã¤ãç´¹ä»ãã¾ãããã æ¥å¸¸çã« git ã使ç¨ãã¦ããã¨ä»ã«ãæ§ã 㪠ããªãã£ããã¨ã«ãããããå ã«æ»ãããã ã¨ããç¶æ³ã«ééãã¾ãã ãã®ã²ã¨ã¤ã²ã¨ã¤ã«ã¤ãã¦å¯¾å¦æ¹æ³ãç´¹ä»ãã¦ããã¾ãã ç®æ¬¡ åé¡1: ã©ã¤ãã©ãªã®æ°æ©è½ã試ãããã«ããããé©å½ãªã³ã¼ããæ¸ãã¦ã¿ããã§ãããè¦ããªããåé¡2: ãããã¯ãã©ã³ãããã¼ã¸ãããã©å®ã¯ã¾ã ä¸å®å ¨ã ã£ãããã¼ã¸ãããç´ããããåé¡3: ãªãªã¼ã¹å¾ã«çºè¦ãããã°ãåå ã¯30æ¥åã«èªåãè¡ã£ãã³ãããã ã£ãããªãã£ããã¨ã«ããããåé¡4: æ°ããã³ããããããã¨ãã¦ééãã¦git commit âamendã§æ¸ãæãã¦ãã¾ã£ããå ã«æ»ããããåé¡5: è²ã ä½æ¥ãã¦ãããä½æ¥ãã£ã¬ã¯ããªã®å 容ãæ··æ²ã¨ãã¦ãããä¸åº¦ç¶ºéºãªç¶æ ã«ããããåé¡6: ä½æ¥ãã£ã¬ã¯ããªã«ã´ããã¡ã¤ã«ãæºã¾ã£ã¦ãããä¸åº¦ç¶ºéº
SourceTreeã§ããããåãæ¶ãã¦ã¿ã ä¿®æ£ãç ´æ£ããï¼git checkoutï¼ ä½ããã¡ã¤ã«ãä¿®æ£ãã¦ãä½æ¥ããªã¼ã«ä¿®æ£ãã¡ã¤ã«ã表示ãããç¶æ ã ãã®ä¿®æ£ãç ´æ£ããå ´åã¯ãç ´æ£ããããã¡ã¤ã«ã§ å³ã¯ãªãã¯ï¼ã¾ãã¯[æä½]ã¡ãã¥ã¼ï¼ãã[ãªã»ãã...]ãé¸ã¶ã [OK]ãã¿ã³ãæ¼ãã¨ä¿®æ£ãç ´æ£ãããã [ãªãã¸ããª]ã¡ãã¥ã¼ã®[ãªã»ãã...]ãããç ´æ£ãããã¨ãå¯è½ã ã¹ãã¼ã¸ãããã¡ã¤ã«ã®åãæ¶ãï¼git resetï¼ Indexã«ãã¡ã¤ã«ãã¹ãã¼ã¸ããç¶æ ã ãã§ãã¯ããã¯ã¹ãå¤ãã°ãã¹ãã¼ã¸ãåãæ¶ããã ååã®ã³ãããã®ä¿®æ£ï¼git commit --amendï¼ ã³ãããã¡ãã»ã¼ã¸ã®ä¿®æ£ ãã¡ã¤ã«ãä¿®æ£ãã¦ã³ãããããç¶æ ã ããã·ã¥ã¯ãã¦ããªãã ã³ãããã¡ãã»ã¼ã¸ãä¿®æ£ããå ´åã¯ã [ã³ããã]ãã¯ãªãã¯ãã¦ãä¸è¨ã®ç»é¢ã表示ããã [ãªãã·ã§ã³ã®ã³ããã]ã§[
GitHub User Group主å¬ã®GitHub Kaigiã6æ1æ¥ãé½å ã§éå¬ããã¾ãããGitHubãå©ç¨ããéçºã¯ã¹ã¿ã¼ãã¢ããããªã³ã©ã¤ã³ãµã¼ãã¹ç³»ã®ä¼æ¥ãªã©ãä¸å¿ã«åºã¾ãã¤ã¤ããããã¾ã¾ãã«æ°å¤ãã®ãã¦ãã¦ã®äº¤æãæ±ãããã¦ãããã¼ã«ã§ãããã¾ãã æ¬è¨äºã§ã¯GitHub Kaigiã®2ã¤ç®ã®ã»ãã·ã§ã³ã¨ãªã£ãæ´å´åªå£æ°ã®ãã¯ã¦ãªããã°ãã¼ã ã®éçºããã¼ã¨GitHubãã®å 容ããã¤ã¸ã§ã¹ãã§ç´¹ä»ãã¾ãã
æè¿ã寺åå±ãã¨ç§°ãã¦å人ã¬ãã¹ã³ã¨ããããæ°åè¦æ¨¡ã®ç§å¡¾ã¿ãããªãã¨ããã£ã¦ãããããã§ããããã«ã¡ã¯ã 寺åå±ã«ã¤ãã¦ã¯å¹´ãæãã¦ããããããã¦ãç¥ããããã¨ãã¦ã寺åå±ã®åå è ã®çããã®éãªã©ã§ãããGitã¯ä½¿ã£ã¦ããã ãã©ãã¢ãããã¼ãå ãFTPããã ãã§â¦ãã©ãã«ããªãã¾ããããï¼ãã¿ãããªè³ªåãåãããã¨ãããã¾ãããã£ãããªãã§ãããæå ã¯å¹çåã§ãã¦ãã®ã«ãæå¾ã®æå¾ãããããã ã¢ãããã¼ãå ãFTPï¼ã¨ãSFTPï¼ãã使ããªãå ´åã¯ããdploy.ioãã¨ããDeployãã¿ããã«GitHubã¨ãBitBucketãèªåã®ãªã¢ã¼ãã®ãªãã¸ããªãããããã¤ã ããã£ã¦ããããµã¼ãã¹ã使ã£ãããããããã®è¾ºãä¸ç·ããã«ãªã£ããBeanstalkãã¿ãããªã®ã使ãã¨ç°¡åãªã®ã§ãããããããããããªãã«ãéã¯ãããã¾ãï¼ãã®è¾ºã®è©±ã¯ããã«æ¸ãã¦ã¾ãï¼ã dploy.io â Co
æ¬è¨äºã§ã¯ãGUIã§æä½ã§ããGitã¯ã©ã¤ã¢ã³ãã§ããSourceTreeã使ç¨ãããã¼ã¸ã§ã³ç®¡çãè¡ãéã«å¿ è¦ãªãªãã¸ããªã®ä½æããªãã¸ããªã¸ã®ãã¡ã¤ã«ã®è¿½å /åé¤ãã³ãããã¨ãã£ãåºæ¬çãªä½æ¥ã«ã¤ãã¦èª¬æãã¾ãã ãé£è¼ãSourceTreeã§å§ããGitãã¼ã¸ã§ã³ç®¡çå ¥é 第1åï¼ãªãã¸ããªã®ä½æã¨åºæ¬çãªãã¼ã¸ã§ã³ç®¡ç 第2åï¼ã¿ã°ã¨ãã©ã³ã 第3åï¼å½ç£ã®Gitãªãã¸ããªãµã¼ãã¹ãSourceForge.JPã æ¬è¨äºã«ã¤ã㦠æ¬è¨äºã¯ã2014å¹´10æ22æ¥ã«ã½ãããã³ã¯ ã¯ãªã¨ã¤ãã£ãããçºå£²ãããæ¸ç±ããã¶ã¤ãã¼ããããã°ã©ãã¼ã¾ã§ 絶対ãããGitãã¼ã¸ã§ã³ç®¡çããããã第2ç« ãã¼ã¸ã§ã³ç®¡çã¯ããã®ä¸æ©ãã®ä¸é¨ãæãåºãåæ§æãããã®ã§ãã ãªããæ¬æ¸ã®è§£èª¬ã§ã¯Mac OS Xçã®SourceTreeã使ç¨ãã¦ãã¾ãããWindowsçã®å ´åã§ãåãæä½ã§ä½æ¥ãè¡ããã¨
SourceTreeã®ä½¿ãæ¹ | ã³ãããã®åãæ¶ãæ¹æ³ã¾ã¨ãï¼amend, reset, revert, cherry-pickï¼ é«æ©è½Gitã¯ã©ã¤ã¢ã³ãã®ãSourceTreeã½ã¼ã¹ããªã¼ãï¼ç¡æï¼ããTowerãï¼æåï¼ã¯å°å ¥ããããæ©è½ãè±å¯ãªãã人æ°ãããã¾ããGitã«ã¯ã³ããããããã·ã¥ã ãã§ã¯ãªããã¾ãã¾ãªæ©è½ãåå¨ããã®ã§ã使ãããªããã¨ã§å¹çããéçºãé²ãã¦ãããã§ããããæ¬è¨äºã§ã¯Gitã使ãä¸ã§å¿ é ã¨ãªãcommitã³ãããã®åãæ¶ãæ¹æ³ããã¼ãã«ã次ã®4ã¤ã®æ©è½ã解説ãã¾ãã ã³ãããã®ä¿®æ£ã»ããç´ãï¼amendï¼ ã³ãããã®åãæ¶ãï¼resetï¼ ã³ãããã®æã¡æ¶ãï¼revertï¼ å¥ãã©ã³ãããã®ã³ãããã®åãè¾¼ã¿ï¼cherry-pickï¼ æ¬è¨äºã§ã¯æ¬¡ã®æ©è½ãSourceTreeã¨Towerã®ä¸¡æ¹ã®ã½ããã¦ã§ã¢ã®æä½æ¹æ³ã¨ãã¦è§£èª¬ãã¾ãã ã³ãããã®ä¿®æ£ã»ã
gitã«ã¦ãæå³ããã«detached HEADç¶æ ã«ãªã£ã¦ãã¾ã£ãå ´åã«å ã«æ»ãæ¹æ³ã«ã¤ãã¦ã¡ã¢ã¡ã¢ã git触ã£ã¦ãã¦ããã¾ã«detached HEADç¶æ ã«çªå ¥ãã¦ãã¾ããã¨ãããã¾ããï¼ç§ã®å ´åï¼ å¤§æµã¯ãcheckoutã§ç¹å®ã®ã³ããããæãã¦ãã¾ã£ãå ´åã§ãã detached HEADã¯ããã®ã¾ãã¾ããã¿ããç¶æ ã®HEADãã§ãã ãã¿ããã¯ã¢ã¿ããã®éãªã®ã§ãããããã®ã¾ãã¾ãåãé¢ãããç¶æ ãã¨ããæå³ã«ãªãã¾ãã ã§ãããã®ç¶æ ã«ãªãã¨gitãè¦åã¡ãã»ã¼ã¸ã表示ãã¦ããã®ã§ããããªããªãã¨ã¢ã»ãã¾ãï½ å ·ä½çã«ã¯ä»¥ä¸ã®ãããªã¡ãã»ã¼ã¸ã表示ããã¾ãã # ãªãã¸ããªåæå git init # é©å½ã«ãã¡ã¤ã«è¿½å ãã¦ã³ããã touch test.txt git add -A git commit -m "add" git commit -am "mod" # ç¾å¨,
git pullã¯ä½¿ããªãã¦ããã åå¿è ã¯git pullã使ããªãæ¹ããã æã ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ã¯åå¼·ã大好ããªã®ã§ãã³ãã³ããããã¨ãããåå¼·ãã¦ä½¿ãããªããªããã°ãããªãã¨èããã¡ã§ãããã¨ãã«ã¯ãè¦ããªãã使ããªããã¨ããçºæ³ã大äºãªã®ã§ã¯ãªãã§ããããã 以ä¸ã«ãã®çç±ãã®ã¹ã¾ãã git pullã¯ä½¿ãå¿ è¦ããªã git pullã使ããªãã¨ã§ããªããã¨ãã¨ããã®ã¯ããã¾ããã 使ããªãã¦ãå ¨ç¶å°ãã¾ããã git fetchã¨git mergeã¨git rebaseã ãã§ãã¹ã¦ã®ç¨ã¯è¶³ãã¾ãã ç§ã¯ãã¼ã éçºã§Gitãæ¬æ ¼çã«ä½¿ãå§ãã¦æ°ãæçµã¡ã¾ãããæ®æ®µã®ä½æ¥ã§git pullã使ã£ããã¨ã¯ãªããããã§å°ã£ããã¨ãããã¾ããã git pullã使ããªããã°ãä½è¨ãªè½ã¨ãç©´ã«è½ã¡ãªã git pullã«ã¯è½ã¨ãç©´ãããã¾ãã åå¿è ã¯ããã¦ããã®ç©´ã«è½ã¡ã¾ãã ã
Frontrend Vol.6 powered by CyberAgent, Inc. http://frontrend.doorkeeper.jp/events/6907 ã§çºè¡¨ãããã¬ã¼ã³è³æã§ãã ããããè³æã«å¯¾ããæãéçãªã®ãã©ããªãã®ãæ°ã«ãªã£ã¦ããã®ã§ããããããããã°ã»ã»ã»ï¼15åããã§ããã½ã¼ã·ã£ã«ã«ã³ããµã¼ãã¹ã ããã§ãm(_ _)m http://kampa.me/t/dev
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}