ã¯ããã« gitã³ãã³ããããããæã£ã¦ããã¨ããã¤ãåããã¨ãã¦ããªãããå¤ããªã£ã¦ãããã®ã§ããããããé¡ã®ã³ãã³ãã¯ã¾ã¨ãã¦ã¨ã¤ãªã¢ã¹(å¥åå)ã«ãããã¨ãã§ãã¾ããããã«ãããèªåã ãã®gitã³ãã³ããå¢ããã¦ãããã¨ãã§ããä½æ¥ãå¹çãããªãã¾ãã ã¨ã¤ãªã¢ã¹ã®ç®¡ç ã¨ã¤ãªã¢ã¹ã¯git configã³ãã³ãã§è¨å®ãã¦ãããã¨ãã§ãã¾ããã¨ã¤ãªã¢ã¹ã«ã¯åã é©ç¨ç¯å²ãè¨å®ãããã¨ãã§ãããã®ç¨éã«å¿ãã¦ä½¿ãåãããã¨ããã¨æãã¾ãã ä»åã¯è²ããªãªãã¸ããªã§å ±éã§ä½¿ããããã«ããæå³ã§ --globalã§ãã£ã¦ããã¾ãã ã¨ã¤ãªã¢ã¹ãä½ã $ git config --global alias.(ã¨ã¤ãªã¢ã¹å) '(ã³ãã³ã)' git configã«--globalãªãã·ã§ã³ãä»ãã¦ãè±æ°åã¨ãã¤ãã³ã®ã¿ã§ããèªç±ã«ååãè¨å®ãã¾ãã ã³ãã³ãã®ã¨ããã«å®éã«è¡ãå¦çãæ¸ãã¾ããå
ä¼ç¤¾ã®åæã§æ¯é±åå¼·ä¼ããã£ã¦ãã¦ãèªåãçºè¡¨ããçªã ã£ãã®ã§æè¿ä½¿ã£ã¦ãCLIãã¼ã«ã«ã¤ãã¦ã¾ã¨ãã¦ã¿ãã hub github/hub ãã«ãªã¯ã¨ã¹ãä½æãªã©Githubä¸ã§ã®ä½æ¥ãã³ãã³ãã©ã¤ã³ãããä¼ç¤¾ã§ã¯GH:Eã§ãã«ãªã¯ãã¼ã¹ã®éçºã¹ã¿ã¤ã«ãªã®ã§æ¯æ¥ä½¿ã£ã¦ãããæè¿ã¯hubã®Goå®è£ ã§ghã¨ããã®ãããã¿ããã ãã©ããã£ã¡ã¯ã¾ã 試ãã¦ããªãã GitHubã¦ã¼ã¶ã¼ã®ããã®hubã³ãã³ã - Qiita tig jonas/tig ã³ããããã°çã®é²è¦§ã楽ã«ãã¦ããããä»äºã§ã¯SourceTreeã使ã£ã¦ããã ãã©ããã£ã±ãã¡ã¤ã³ã®ä½æ¥ã¯ã¿ã¼ããã«ä¸ã ããlogã»diffã»stashããããgitã³ãã³ãããã¯ããã«è¦ãããã¦ææ¾ããªãã ~/.tigrc ã«ä»¥ä¸ã®ãããªè¨å®ããã¦ããã°ãhistoryã§é¸æãã¦ããcommitã®Githubãã¼ã¸ãããéããã¨ãã§ãã¦ä¾¿å©ã t
æè¿æè¡ç ä¿®ã§Javaãã£ã¦ã¾ãã ã§ã.classã¨ããã³ããããã¦ãã¾ã人ãå± ã¦ãããã¯.gitignoreãã¡ããã¨è¨å®ãã¹ããã§ãã ã§ããã¡ããã¨.gitignoreãä½ããã£ã¦çµæ§é¢åãããã§ããä¾ãã°ãMacã ã£ãã .DS_Store ã.gitignoreããã¹ãã ããJavaã ã£ãã *.class ã¨ããEclipseã¾ã§æãã ã㨠bin ã¨ãã ããã§ã gibo ã¨ããã½ããã¦ã§ã¢ãè¶ ããããã§ãï¼ ã§ããã㨠$ gibo Java ã¨ããã¨ã ### https://raw.github.com/github/gitignore/master/Java.gitignore *.class # Mobile Tools for Java (J2ME) .mtj.tmp/ # Package Files # *.jar *.war *.ear ã¨ããæååãä½ã
Gitã§ç¡è¦ãã¡ã¤ã«ãç´°ããè¨å®ããéã«ã¯ã¾ã£ãã®ã§ãã¡ã¢ ãã«ã ãã¾ã£ããããã㧠$ man gitignore webç åæ ã¾ãã¯åæãæãã¦ãããªãã¨ãã¯ã¾ã æ¢ã«ãã©ãã¯ããããã¡ã¤ã«ã¯gitignoreãå¹ããªã $ git init $ touch hoge.txt $ git add hoge.txt # ãã©ãã¯ãããå¾ã« $ vim .gitignore # ç¡è¦è¨å®ãã¦ã hoge.txt $ git status # å¹ããªã æ¢ã«ãã©ãã¯ããããã¡ã¤ã«ãç¡è¦å¯¾è±¡ã«ããããã°ãgit rm --cached $ git rm --cached hoge.txt # ä¸è¨ã®ãã©ãã¯ããããã¡ã¤ã«ãã¤ã³ããã¯ã¹ããåé¤ããã°ï¼ã¯ã¼ã¯ããªã¼ã¯ãã®ã¾ã¾ï¼ $ git status #gitignoreãå¹ã # ããhoge.txtãcommitæ¸ã¿ã®å ´å $ git
$ git push origin :remote_branch_nameã¨ãããã¨ãªã¢ã¼ããã©ã³ããåé¤ã§ããã®ã§ããä¸è¨ã³ãã³ããå®è¡ããç°å¢ä»¥å¤ã§ git branch -aãããã¨ã¾ã 表示ããã¦ãã¾ã£ã¦ããã®ã§æ¶ãæ¹æ³ã git fetchã§è¡ãããã¨æã£ãã®ã§ããã©ããfetchã¯åæãã¨ããã®ã§ã¯ãªãåãã«è¡ãã ãã®ããã§ããã ä¸è¨ãµã¤ããåèã«ããã¦ããã ãpruneãªãã·ã§ã³ã®åå¨ãç¥ãã¾ããã ã©ãã«ããªã³ã¯ãã¦ããªããªãã¸ã§ã¯ãã¯åé¤ãã¦ãããããã§ãã $ git fetch --prune 2011-12-01 ãã ããã®ãªãã·ã§ã³ã¯git1.6.6以éã®ã¿ä½¿ç¨å¯è½ã¨ã®ãã¨ã§ã git fetch --prune doesn't exists with all git versions · Issue #75 · fcuny/jitterbug · GitHub
.bashrcã«ä¸è¨ã追å source ~/.git-completion.sh GIT_PS1_SHOWDIRTYSTATE=true GIT_PS1_SHOWSTASHSTATE=true GIT_PS1_SHOWUNTRACKEDFILES=true GIT_PS1_SHOWUPSTREAM=auto export PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ ' åè¡ã®æå³ 1è¡ç®ï¼è£å®ã®æå¹å 2-5è¡ç®ï¼ãªãã¸ããªç¶æ ã®éç¥è¨å®ï¼è©³ç´°ã¯åä½ç¢ºèªã®é ãåç §ï¼ 6è¡ç®ï¼bashããã³ããã®è¡¨ç¤ºå½¢å¼ã»è²ã®è¨å® .bashrcãåå¨ããªãå ´åã¯æ°è¦ä½æ Macã®ããã©ã«ãã§ã¯.bashrcãèªã¿è¾¼ãè¨å®ã«ãªã£ã¦ããªããããªã®ã§ ä¸è¨ãµã¤ããåèã«.bash
Linuxã«ã¼ãã«ãRuby on RailsãPerlãªã©ãè¿å¹´å¤ãã®å¤§è¦æ¨¡ããã¸ã§ã¯ãã§æ¡ç¨ããã¦ãããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ããGitãã ãGitã«ã¯é常ã«å¤æ°ã®ã³ãã³ããç¨æããã¦ããããæ¥å¸¸çã«ä½¿ç¨ããã³ãã³ãã¯20åç¨åº¦ã¨è¨ããã¦ãããæ¬è¨äºã§ã¯ãGitã使ãããªãããã«è¦ããã¹ã20åã®Gitåºæ¬ã³ãã³ããç´¹ä»ããã Linuxã«ã¼ãã«ãRuby on RailsãPerlãªã©ãè¿å¹´å¤ãã®å¤§è¦æ¨¡ããã¸ã§ã¯ãã§æ¡ç¨ããã¦ãããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ããGitãã ãGitã«ã¯é常ã«å¤æ°ã®ã³ãã³ããç¨æããã¦ããããæ¥å¸¸çã«ä½¿ç¨ããã³ãã³ãã¯20åç¨åº¦ã¨è¨ããã¦ãããæ¬è¨äºã§ã¯ãGitã使ãããªãããã«è¦ããã¹ã20åã®Gitåºæ¬ã³ãã³ããç´¹ä»ããã ãªããGitã®åºæ¬çãªèãæ¹ã使ãæ¹ã«ã¤ãã¦ã¯åæ£ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã Gitå ¥éã§ãç´¹ä»ãã¦ããã®ã§ããã¡ããåç §ãã¦ã»ããã
å¹³ç´ ããã¤ãã³ãã«ã¬ã³ãã¼ï¼ãã°ããå©ç¨ããã ããèª ã«ãããã¨ããããã¾ãã ã¤ãã³ãã«ã¬ã³ãã¼ï¼ãã°ã¯ãITã»è£½é æ¥ã»ãã¸ãã¹é¢ä¿ã®ã¤ãã³ãï¼ã»ããã¼ã»å±ç¤ºä¼ã»åå¼·ä¼ã»ã³ã³ãã¹ãã»Webã¤ãã³ããªã©ï¼ãéå¬ããä¼æ¥ã»ã³ãã¥ããã£ãç»é²ããã¤ãã³ãæ å ±ã®ãã¼ã¿ã«ãµã¤ããã¨ãã¦ç´7å¹´ééå¶ããã¦ãã¾ãããããã¾ã§ãµã¼ãã¹ãç¶ãããã¨ãã§ããã®ã¯ãã¤ãã³ãã«ã¬ã³ãã¼ï¼ãã°ã®ã³ã³ã»ããã«å ±æãããã ããé©åãªã¤ãã³ãæ å ±ããå¯ãããã ããçãã¾ã®ãæ¯æ´ããã£ãããããã¨èãã¦ããã¾ããéãã¦å¾¡ç¤¼ç³ãä¸ãã¾ãã ããããªãããã¤ãã³ãæ å ±ã®å ¥ææ¹æ³ã®å¤æ§åãã¤ãã³ãç´¹ä»ãµã¼ãã¹å¸å ´ã®ç¶æ³ãï¼ ITã®ä»å¾ã®ã¡ãã£ã¢éå¶æ¹éãªã©ãæ¤è¨ããçµæã2020å¹´6æ30æ¥ï¼ç«ï¼15:00ããã¡ã¾ãã¦ã¤ãã³ãã«ã¬ã³ãã¼ï¼ãã°ã®ãµã¼ãã¹ãçµäºãããã¨ã«ãã¾ããã ããã¾ã§ãå©ç¨ãããã ãã¾ããçãã¾ã«ã¯æ®å¿µãªãç¥ã
ãã¼ã«ã«ã§ GitHub ãæ§ç¯ï¼ Git ãªãã¸ããªç®¡çãã¼ã«ãGitLabãã Mac OS X ã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ã GitLab ã¨ã¯ GitLab 㯠Git ãªãã¸ããªãç°¡åã«ç®¡çã§ãããã¼ã« Gitolite ããã©ã¦ã¶ãã管çã§ããããã«ãã Ruby ã¢ããªã±ã¼ã·ã§ã³ã§ãã GitHub ã®ãªã¼ãã³ã½ã¼ã¹ã¯ãã¼ã³ã¨å¼ã°ãããã¨ããåããããã«ãUI ã GitHub ã¨ãã£ã¡ãä¼¼ã¦ãã¾ãã GitHub ã¿ãããªãµã¼ãã¹ã使ãããï¼ã ãã© Public ã¯ã¢ã¬ã ãªã¨ãããã¨ãããã¨æãã¾ãããããªã¨ãã«ä¾¿å©ã§ãã 社å GitHub ã¨ãã¦ä½¿ãã±ã¼ã¹ã主ãªã¦ã¼ã¹ã±ã¼ã¹ã ã¨æãã¾ãã ããããã¹ã¦ãã¼ã«ã«ã ãã§ä½ããã¨ãã§ããã®ã§ããã¼ã«ã«ãã·ã³ã«ã¤ã³ã¹ãã¼ã«ããã°ãæ§ç¯å¾ã¯ãããã¯ã¼ã¯ãªã㧠GitHub çãªç°å¢ã使ããã¨ãã§ãã¾ãï¼ ãã㪠GitLab ã Mac
ããããããµã«å çã®Gitå ¥éã¸ã Gitãã¤ãã£ã¦ãã¼ã¸ã§ã³ç®¡çãã§ããããã«ãªãããã«ä¸ç·ã«åå¼·ãã¦ããã¾ãããï¼ ã³ã¼ã¹ã¯4ã¤ãGitåå¿è ã®æ¹ã¯ãå ¥éç·¨ãããã©ãããGitã使ã£ãäºãããæ¹ã¯ãçºå±ç·¨ããããããã§ããããã«ããã«ãªã¯ã¨ã¹ãç·¨ãã§ã¯ãã³ã¼ãã¬ãã¥ã¼ããæåããã¼ã ã«æ ¹ä»ããã¾ãããã ãããï¼ä½ã ã£ãâ¦ï¼ãã¨ããæã¯ãéå¼ãGitãã§èª¿ã¹ã¦è¦ã¦ãã ãããã
gitã§å§ããããã¸ã§ã¯ããSubversionã®ãªãã¸ããªã«ãããã£ãã®ã ããã©ããã£ããããã®ã調ã¹ã¦ãããããããªãã Subversionããgitã¯ããããã®ã«ãã¼ã 試è¡é¯èª¤ã®çµæã¨ãããããã¾ããã£ãã£ã½ãã®ã§è¨é²ãæ®ãã¦ããã ããã§å¤§ä¸å¤«ãªã®ãã©ããã¯ããããããªãã ãã£ã¨id:bleis-tiftå çããªãã¨ããã¦ãããããºï¼ gitããSubversion㸠移è¡å ã¨ãªãæ°ããSubversionãªãã¸ããªãç¨æããã svnadmin create foo ãã§ãã³ãããããªãã¨ãã¾ããããªãæãã ã£ãã®ã§trunk,branches,tagsãä½ã£ã¦ããã svn checkout http://localhost/svn/foo foo cd foo mkdir {trunk,branches,tags} svn commit -m "init" ãªããfil
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}