Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
GitHub ãªã©ã§ Pull Request ãã¼ã¹ã§éçºããã¦ããã¨ãmaster ã«ã¯ééã£ã¦ã push ããããªãããã§ãã GitHub å´ã«ã¯æ®å¿µãªãã master ã¸ã® push ãç¦æ¢ãããããªè¨å®ã¯ã§ããªãã®ã§ãä»æ¹ãªãã®ã§ã¯ã©ã¤ã¢ã³ãå´ã® Hook ã§å¯¾å¿ãããã£ã¦ãã¨ã«ãªãããã®æ¹æ³ã«ã¤ãã¦ã°ã°ãã¨ããã¨ãããã¨ããããã¤ãæ¹æ³ãç´¹ä»ãã¦ãããã¼ã¸ãåºã¦ãããã§ãããã©ããããæ¹ãééã£ã¦ãã*1ã®ã§ãæ£ããæ¹æ³ãç´¹ä»ã ä½ãã¾ããã®ã ä¸è¨ã«æããæ¹æ³ã§ã¯ãç´°ããé¨åã¯éã£ã¦ãããããã©ãgit symbolic-ref HEAD ã使ã£ã¦ç¾å¨ãã©ã³ããè¦ã¦ãmaster ã ã£ãã push ãç¦æ¢ãããã¨ããæ¹æ³ãåã£ã¦ããã ããããpush ã¯ã«ã¬ã³ããã©ã³ãããè¡ãããã¨ã¯éããªããdev ãã©ã³ãã«ããã¨ãã« git push origin maste
#!/bin/sh rm -fr .git *.txt .gitignore git init echo init.sh>.gitignore && git add .gitignore && git commit -m "Initial Commit" echo b>b.txt && git add b.txt && git commit -m "master 1" git branch other echo c>c.txt && git add c.txt && git commit -m "master 2" echo d>d.txt && git add d.txt && git commit -m "master 3" git checkout other echo e>e.txt && git add e.txt && git commit -m "other 1" echo
Rails 3ã®gemã®ç®¡çã«ä½¿ç¨ãããbundlerã®ä½¿ãæ¹ã復ç¿ãã¾ãã Bundlerã®ç¾æç¹ã®ææ°å®å®çã®version 1.2.3ã対象ã¨ãã¾ããBundlerã使ãã¨ä½ãå¬ããã®ãï¼ ããgemãéçºç°å¢ã«ã¯ã¤ã³ã¹ãã¼ã«ããã¦ããããproductionç°å¢ã«ã¯ã¤ã³ã¹ãã¼ã«ããã¦ããªããã¨ãã£ãåé¡ãç¡ããªãã ããã¸ã§ã¯ãã«å¿ è¦ãªgemãã¯ã£ããããããã¨ãã§ããã Bundlerã®ã¤ã³ã¹ãã¼ã« %~ gem install bundler ã·ã¹ãã æ¨æºã®rubyã使ç¨ãã¦ããå ´åã¯sudoãå¿ è¦ãªå ´åãããã¾ããrbenvãrvmã使ç¨ãã¦ããå ´åã¯gem install bundlerã®ã¿ã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã bundle checkã§ã¤ã³ã¹ãã¼ã«å¿ è¦ãªgemããã§ã㯠Gemfileã®ä¸ã«è¨è¼ããã¦ããgemã®ãã¡ãããããã©ããã¤ã³ã¹ãã¼ã«ããªããã°ãªããªãã
ãç²ããã¾ã§ããtrebyã§ãã ããã ãã¶æ¥ä»ãå¤ãããããªå¢ãã§ãããGit Advent Calendar 2014ã®23æ¥ç®ãæ å½ããã¦ããã ãã¾ãã Gitãæ¥åã§ä½¿ãå§ãã¦æ©2å¹´ãã ãã¶æ £ãã¦ããæããããã¾ããããããã¢ã¦ããããããæ©ä¼ããããã¨ããã°ãªããªãããã¾ããããããããã¾ã«ååã«èããããããã§ãªãããã£ãããªãæããããã¾ãã ããã§ä»æ¥ã¯ç§å人ãgitã使ã£ã¦ä»äºãããä¸ã§ã©ãããããã¼ãã¦ããããªã¼ã¨ãããã¨ãæ¹ãã¦æåã«ã¢ã¦ãããããã¦ã¿ããã¨æãã¾ãããåèã«ãã¦ããã ããªããããã³ããã¦ããã ããªããã¦ããã ãã¾ãã¨å¹¸ãã§ãã ãªããæ¬æ稿ã«ããã¦æ³å®ãããã¼ã«ã¯Gitããã¹ãã£ã³ã°ãµã¼ãã¹ã¯GitHubã§ãããå¤åãã®ä»ã®ãµã¼ãã¹ã§ããããã®ã§ã¯ãªããã¨æãã¾ãã éçºæºå ãæ°ãããã¼ã ã«é å±ãããï¼ãçã®ã·ãã¥ã¨ã¼ã·ã§ã³ãæ³å®ãã¦ãã¾ãã éçº
ãã®è¨äºã¯Git Advent Calendar 2014ã®6æ¥ç®ã®è¨äºã§ãï¼ ï¼æ´æ°ããæ¼ã«ãªã£ã¦ãã¾ãã¾ãããããããªããï¼ï¼ï¼ ã¿ãªããï¼ Gitã®-pãªãã·ã§ã³ä½¿ã£ã¦ã¾ããï¼ ä»æ¥ã¯ä¾¿å©ãª-pãªãã·ã§ã³ã使ããã³ãã³ãã¨ã使ãã©ããããç´¹ä»ãã¾ãï¼ ç´¹ä»ããå 容 git add -p git stash -p git log -p git stash show -p git checkout -p git add -p ãã£ã¨ãããä¸çªæåã§ããï¼ è¿½å ãããå¤æ´ãããã¡ã¤ã«åä½ã§ã¯ãªãå·®åã®ãããã¯ãã¨ã«è¿½å ãã¦ãããã¨ãã§ãã¾ãã Git管çããã¦ããindex.htmlã«ã以ä¸ã®ä¿®æ£ãå ããã¨ãã¾ãããã ãããã¼ã®ã¡ãã¥ã¼ã®æåãå°æåãã大æåã«å¤æ´ Contactã«æ°ãããªã³ã¯ã追å ãã®ã¾ã¾ä¸¡æ¹ã¾ã¨ãã¦ã³ããããã¦ã³ãããã¡ãã»ã¼ã¸ã«ä¸¡æ¹ã®å 容ãæ¸ãã¦ããã¨ããã®ãã²
TL;DR: ã°ãã¼ãã«ãª gitignore ã« ,/ ã追å ãã¦ãä½æ¥ç¨ã¹ã¯ãªããã , ãã£ã¬ã¯ããªã«å ¥ããã¨ä¾¿å©ã ,/tmp_script.sh ã§å®è¡ã§ããã Git ãªãã¸ããªã®ä¸ã«ä¸æçã«ä½¿ãä½æ¥ç¨ã¹ã¯ãªãããç½®ãã¦ãããããã¨ããããèªåã ãã使ããã®ãªã®ã§ã³ãããã¯ããããªããããã¡ãã¡ .git/info/exclude ã«è¿½å ãã¦ç¡è¦ãããã®ãé¢åèãã ä»ã¾ã§èªåã¯ã tmp_script.sh~ ã tmp_script.sh.bak ãªã©ãã°ãã¼ãã«ãª gitignore ã§ç¡è¦ããããã¡ã¤ã«åã«ãã¦ããããããã¯ä¸è¦ãªãã¡ã¤ã«ã¨ééãã¦æ¶ãã¦ãã¾ãå±éºãããã ignored.tmp_script.sh ã¯åãããããã¶ãé·ãã _tmp_script.sh ã¯æªããªãããã³ããããã¹ããã¡ã¤ã«ã«ãã¢ã³ãã¼ã¹ã³ã¢ã§å§ã¾ããã®ããã£ã¦ç´ããããã ããã§ãä½æ¥
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-
GitHubã§ã®ãªãªã¼ã¹ ååãGitHubã®Releaseæ©è½ã¤ãã¦æ¸ãã¾ããããããã¯ãªãªã¼ã¹ããå´ã®èªååçã«ã¤ãã¦ã§ããã git tagã¨GitHub Releasesã¨CHANGELOG.mdã®èªååã«ã¤ã㦠| Web Scratch ä»åº¦ã¯ãããããã©ã¤ãã©ãªã¦ã¼ã¶ã¼ã ã£ããã½ããã¦ã§ã¢ã®å©ç¨è å´ããã GitHubã§ãªãªã¼ã¹ããããã®ãã©ã追ã£ã¦ãããã«ã¤ãã¦æ¸ãã¦ããããã¨æãã¾ãã èªåã¯ãJSer.infoã¨ããJavaScriptã®æ å ±ãè¦ã¦ãããµã¤ãããã£ã¦ããã®ã§ã JavaScriptã®ã©ã¤ãã©ãªçã®ãªãªã¼ã¹æ å ±ãã©ã追ã£ã¦ããããä¸å¿ã«ãªãã¾ãããåºæ¬çã«GitHubã§ãªãªã¼ã¹ããã¦ããªãããæ¹ã¯å¤§ããªéãã¯ããã¾ããã åºæ¬çã«ã¯ä»¥ä¸ã«è²ã æ¸ãã¦ããå 容ã®GitHubã«é¢ãã¦ãã¾ã¨ããæãã®è¨äºã¨ãªã£ã¦ãã¾ãã æè¿ã®JavaScriptæ å ±ã®æ¢ãæ¹ Â·
ç§ã¯ GitHub ã大好ãã§ããGitHubã¯ãªã¼ãã³ã½ã¼ã¹ã¸ã® ã³ã³ããªãã¥ã¼ã·ã§ã³ ï¼å¯ä¸è²¢ç®ï¼ãä½ååã容æã«ãããã¦æ¥½ãããã®ã«ããã¨æãã¾ããã§ãããGitHubãPull Requestã¨ããwebã®UIå½¢å¼ã§åé¢ã«æ¼ãåºãã¦ãããªã¼ãã³ã½ã¼ã¹ã® ã¡ã³ããã¼ ã®ã¯ã¼ã¯ããã¼ããããã¸ã§ã¯ãå質ã¨ã³ã³ããªãã¥ã¼ã·ã§ã³ãåãã¤ããã¹ãã¼ãã®å¼å®³ã«ãªãã¨ãããã¨ã«æ°ãã¤ãã¾ãããããã§ãGitHubã® Pull Request ã«ãããMerge pull requestããã¿ã³ãã¯ãªãã¯ããåã«ãå°ãã話ãããã¦ãã ããã ã¡ã³ããã¼ã®ç´¹ä» ã¸ã§ã¼ã³ã¯ããããã®æåãåãã¦ãããªã¼ãã³ã½ã¼ã¹ããã¸ã§ã¯ãã®ã¡ã³ããã¼ã§ãã彼女ã¯æ¯é±ããã¸ã§ã¯ãã®GitHubãªãã¸ããªã«ä¸ããæ°ãã Issue ã確èªãããªã¯ã¨ã¹ãã«å¯¾ãéããã«ãã£ã¼ãããã¯ãè¿ãã¾ãããªã¯ã¨ã¹ãããã¹ã¦å®è¡ããæ
æè¿ã®éçºã§ã¯ãå¿ é ã«ãªã£ã¦ãã Githubã®ä½¿ãæ¹ãç°¡åã«å¦ã¹ããµã¤ãï¼ãã¶ã¤ãã¼ãã³ã¼ãã¼ããã§Githubã®ä½¿ãæ¹ãããããªãã®ã§æéãããã£ã¦ãã¾ãããï¼ ãã¡ãã®ãµã¤ãã§å¦ã¶ã¨å¹çãè¯ãã§ããï¼ ãã®ãµã¤ãã§ã¯ãä¸è¨ã®ç¨®é¡ã®gitã³ãã³ããå¦ã¶ãã¨ãã§ãã¾ããcommit branch checkout cherry-pick reset revert rebase merge
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? ãã㯠Git (ã Subversion ãªã©ã®ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ) ã«ã³ãããããæã«ããè¯ãã³ãããã¡ãã»ã¼ã¸ãæ¸ãããã®æè¨ã§ãããã®æè¨ã¯ç¹ã«ã¡ãã»ã¼ã¸ã®ä¸è¡ç®ã ãã対象ã¨ãã¾ããããã¦æãéè¦ãªä¸è¡ç®ã ãã§ãè¯ãã¡ãã»ã¼ã¸ãæ¸ãã¦æ¬²ããããã§ããæè¨ããºããªä¸è¨ã§è¡¨ã㨠ä¸è¡ç®ã«ã¯è¦æ±ä»æ§ãæ¸ã ã§ãã èæ¯ ããã¸ã§ã¯ãã«ãã£ã¦ããããæ £ç¿ã®å·®ã¯ãããã®ã®ãä¸è¬çã«ã¯ãã³ãããã¡ãã»ã¼ã¸ã®ä¸è¡ç®ã¯å¤æ´å 容ã®è¦ç´ãç°¡æ½ã«æ¸ããã¨ããã¾ããç¹ã« Git ã¯ãåã³ãããã¡ãã»ã¼ã¸ã®ä¸è¡ç®ã ããåãåºãã¦ãããä¸è¦§è¡¨ç¤ºãããªã©
2014å¹´05æ19æ¥10:17 Git gitã®æ´å²ä¸ããpasswordãå®å ¨ã«åé¤ããã git ã§ç®¡çãã¦ããããã¸ã§ã¯ãã§ããã£ããã¾ã£ããã¹ã¯ã¼ããç´ãè¾¼ãã§ãã¾ã£ãâ¦ï¼ãã¿ãããªãã¨ããã£ã¦ãã©ããããããããã¼ï¼ï¼ãã¨æã£ã¦ãããã§ãããgit filter-branch ã¨ããæå¼·ã®ã³ãã³ãã使ãã°ãªãã¨ããªããã§ããã ä»å㯠PASSWORD ã¨ããæååãå«ãè¡ã git ã®æ´å²ä¸ããå®å ¨ã«åé¤ããã¨ããã®ããã£ã¦ã¿ã¾ãããsed -e '/xxx/d' ã xxx ã¨ããæååãå«ãè¡ãåé¤ (delete) ããã³ãã³ãã§ãã git filter-branch --tree-filter "find . -type f -exec sed -i '' -e '/PASSWORD/d' {} \;" ãããã㨠PASSWORD ã¨ããæååãå«ãè¡ã®çè·¡ãå¥éº
ã¯ããã« gitã¯ã³ããããã¨ã«ã¬ãã¸ããªå ã®ãã¡ã¤ã«å ¨ã¦ãã¹ãããã·ã§ããã¨ãã¦ä¿åããã¨ãããªãã㪠è¨è¨ã«ãªã£ã¦ããã ãããgitã®ä¾¿å©ãã®æ以ãªã®ã ãç»åãã¼ã¿ãé³å£°ãã¼ã¿ã®ãããªãã¤ããªãã¼ã¿ãæã¨ãã¨ãã㨠å°ãã®å¤æ´ã§ããã®ãã³ã«ã³ãã¼ãçãã¦ãã¡ã¤ã«ãµã¤ãºåã®å®¹éãå¢ãããã¨ã«ãªãããã£ã¨ããéã«ã¬ãã¸ããªã è¥å¤§åãã¦ãã¾ãã ç¹ã«å¦ç¿çµæããã¡ã¤ã«ã«ä¿æãã¦ãã¹ãçã«ä½¿ãã¾ãããããªããã°ã©ã ã管çãããã¨ãã㨠ã¢ã«ã´ãªãºã ã®ãã©ã¡ã¼ã¿ãå°ãå¤ãããã³ã«100kBè¿ã容éãå¢ãã¦ãããå®ã«ã¤ã±ã¦ãªãã æ®éãªã.gitignoreã«*.xmlã¨æ¸ãã¦ãã¼ã¿èªä½ã¯æå管çããããã·ã³ããªãã¯ãªã³ã¯ã«ãã¦å¥ãã£ã¬ã¯ããªã«ç½®ãã¦ããã ãrsyncã§åæããããã«ããããããã ã éå»ã®å®é¨æã®ç¶æ ã«æ»ããªãã£ãããæ¯årsyncããã®ã¯ä¸ä¾¿ã ã£ãã ãªããç¡ãããªã¼ã¨æã£
ããFTPãå©ç¨ãããã¨ã¯æ¢ãã¦ãGitã使ããããã®ã»ããã¡ãªãããå¤ããã¼ 2014.02.26 | ãã®æ¹æ³ãå§ãã§ãï¼ | è¦ãã¦ãããã ã©ãã©ããã¼ãã«ãã¨ã¡ã¬ããã¨å¤§ä¸²ã§ãã æè¿ãªã«ãã¨æ¶ããããªãã¾ãã¦ãã¡ãã£ã¨èº«è¿ãªäººã®Blogã¨ãèªãã ãã§ãç±ããã®ããã¿ä¸ããããã¦ãã¾ãããããããã¨ã£ã¦ä»å¾ãå¢ãã¦ãããã§ãããããæ¯è¦ªãããããã£ãããã¬ãã«åãã£ã¦æ³£ãã¦ããã®ãé ·ããä»æ¥ãã®ããã§ãã ãã¦GitHubã·ãªã¼ãºã§ãããåå㯠GitHubãã¤ãã£ã¦å ±åéçºï¼ ãµã¤ãã®ãã¶ã¤ã³ãªãã¥ã¼ã¢ã«ãã¾ãã !ã¨ããè¨äºãæ¸ãã¾ããããã¡ããä»ãå ±åéçºã¯ç¶ãã¦ããã¾ãã¦ã次ã®ãã¤ã«ã¹ãã¼ã³ã¯ææ«ãäºå®ãã¦ããã¾ããéæçã¯25%ã§ããããªãã¨ãªããã§ãããããããã¶ãããããããã ããã¦ãããã®æ¬é¡ã§ãããã¿ã¤ãã«ã®éããFTPãããã¦gitã§ãã¡ã¤ã«ã®éä¿¡åä¿¡ããã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}