-
6. GitHub
-
7. Git ã®ããŸããŸãªããŒã«
- 7.1 ãªããžã§ã³ã®éžæ
- 7.2 察話çãªã¹ããŒãžã³ã°
- 7.3 äœæ¥ã®é ããããšæ¶ããã
- 7.4 äœæ¥å 容ãžã®çœ²å
- 7.5 æ€çŽ¢
- 7.6 æŽå²ã®æžãæã
- 7.7 ãªã»ããã³ãã³ã詳説
- 7.8 é«åºŠãªããŒãžææ³
- 7.9 Rerere
- 7.10 Git ã«ãããããã°
- 7.11 ãµãã¢ãžã¥ãŒã«
- 7.12 ãã³ãã«ãã¡ã€ã«ã®äœæ
- 7.13 Git ãªããžã§ã¯ãã®çœ®ãæã
- 7.14 èªèšŒæ å ±ã®ä¿å
- 7.15 ãŸãšã
-
8. Git ã®ã«ã¹ã¿ãã€ãº
- 8.1 Git ã®èšå®
- 8.2 Git ã®å±æ§
- 8.3 Git ããã¯
- 8.4 Git ããªã·ãŒã®å®æœäŸ
- 8.5 ãŸãšã
-
9. Gitãšãã®ä»ã®ã·ã¹ãã ã®é£æº
-
10. Gitã®å åŽ
- 10.1 é 管ïŒPlumbingïŒãšç£åšïŒPorcelainïŒ
- 10.2 Gitãªããžã§ã¯ã
- 10.3 Gitã®åç §
- 10.4 Packfile
- 10.5 Refspec
- 10.6 転éãããã³ã«
- 10.7 ã¡ã³ããã³ã¹ãšããŒã¿ãªã«ããª
- 10.8 ç°å¢å€æ°
- 10.9 ãŸãšã
-
A1. ä»é² A: ãã®ä»ã®ç°å¢ã§ã®Git
- A1.1 ã°ã©ãã£ã«ã«ã€ã³ã¿ãã§ãŒã¹
- A1.2 Visual Studioã§Gitã䜿ã
- A1.3 Eclipseã§Gitã䜿ã
- A1.4 Bashã§Gitã䜿ã
- A1.5 Zshã§Gitã䜿ã
- A1.6 Powershellã§Gitã䜿ã
- A1.7 ãŸãšã
-
A2. ä»é² B: Gitãããªãã®ã¢ããªã±ãŒã·ã§ã³ã«çµã¿èŸŒã
-
A3. ä»é² C: Gitã®ã³ãã³ã
- A3.1 ã»ããã¢ãããšèšå®
- A3.2 ãããžã§ã¯ãã®ååŸãšäœæ
- A3.3 åºæ¬çãªã¹ãããã·ã§ãã
- A3.4 ãã©ã³ããšããŒãž
- A3.5 ãããžã§ã¯ãã®å ±æãšã¢ããããŒã
- A3.6 æ€æ»ãšæ¯èŒ
- A3.7 ãããã°
- A3.8 ãããã®é©çš
- A3.9 ã¡ãŒã«
- A3.10 å€éšã·ã¹ãã
- A3.11 ã·ã¹ãã 管ç
- A3.12 é 管ã³ãã³ã
10.8 Gitã®å åŽ - ç°å¢å€æ°
ç°å¢å€æ°
Gitã¯åžžã« bash
ã·ã§ã«å
ã§å®è¡ãããŸãããŸãããããã©ã®ããã«åäœãããã決å®ããããã«ãå€ãã®ã·ã§ã«ç°å¢å€æ°ã䜿çšããŠããŸãã
å Žåã«ãã£ãŠã¯ããããã®ç°å¢å€æ°ãäœã§ããããGitãæã¿éãã«åããããã«ã©ããªãµãã«äœ¿çšã§ããããç¥ã£ãŠããæ¹ã䟿å©ã§ãã
ãã®ãªã¹ãã¯ãGitãåç
§ããç°å¢å€æ°ãã¹ãŠã網çŸ
ããŠã¯ããŸãããããã£ãšãæçšãªãã®ãåãäžããŠããŸãã
ã°ããŒãã«ãªæ¯ãèã
Gitã®ã³ã³ãã¥ãŒã¿ããã°ã©ã ãšããŠã®äžè¬çãªåäœã®äžã«ã¯ãç°å¢å€æ°ã«äŸåããŠãããã®ãããã€ããããŸãã
GIT_EXEC_PATH
ã¯ãGitããµãããã°ã©ã ïŒgit-commit
ã git-diff
ãªã©ïŒãæ¢ããã£ã¬ã¯ããªã決å®ããŸãã
git --exec-path
ã§çŸåšã®èšå®ã確èªã§ããŸãã
HOME
ã¯éåžžã«ã¹ã¿ãã€ãºãããããšãèæ
®ãããŠã¯ããŸããïŒä»ã«ãã®å€æ°ã«äŸåããŠãããã®ããããããïŒããGitã¯ãã®ãã£ã¬ã¯ããªããã°ããŒãã«èšå®ãã¡ã€ã«ãæ¢ããŸãã
Gitãå®å
šã«ããŒã¿ãã«ãªç¶æ
ã§ã€ã³ã¹ããŒã«ããããªããã°ããŒãã«èšå®ããã¹ãŠåããäžã§ãããŒã¿ãã«ãªGitã®ã·ã§ã«ãããã¡ã€ã«ã§ HOME
ãäžæžãã§ããŸãã
PREFIX
ããããšäŒŒãŠããŸããããã¡ãã¯ã·ã¹ãã å
šäœã®èšå®ã§ãã
Gitã¯ãã®ãã¡ã€ã«ã $PREFIX/etc/gitconfig
ããæ¢ããŸãã
GIT_CONFIG_NOSYSTEM
ãèšå®ãããšãã·ã¹ãã å
šäœã®èšå®ãã¡ã€ã«ãç¡å¹ã«ããŸãã
ããã¯ãã³ãã³ãã®å®è¡ã«ããã£ãŠã·ã¹ãã å
šäœã®èšå®ãéªéã«ãªããããããå€æŽãããåé€ãããããã¢ã¯ã»ã¹æš©ããªãå Žåã«äŸ¿å©ã§ãã
GIT_PAGER
ã¯ã³ãã³ãã©ã€ã³ã§è€æ°ããŒãžã«ãããåºåã衚瀺ããéã«äœ¿çšãããããã°ã©ã ãå¶åŸ¡ããŸãã
èšå®ãããŠããªãå ŽåãPAGER
ã代ããã«äœ¿çšãããŸãã
GIT_EDITOR
ã¯ããã¹ãïŒäŸãã°ã³ãããã¡ãã»ãŒãžïŒãç·šéããå¿
èŠããããšãã«Gitããèµ·åããããšãã£ã¿ã§ãã
èšå®ãããŠããªãå Žåã EDITOR
ã代ããã«äœ¿çšãããŸãã
ãªããžããªã®å Žæ
Gitã¯ãGitãšçŸåšã®ãªããžããªãšã®ã€ã³ã¿ãã§ãŒã¹æ¹æ³ã決å®ããã®ã«ãããã€ãã®ç°å¢å€æ°ã䜿çšããŸãã
GIT_DIR
㯠.git
ãã©ã«ãã®å Žæã§ãã
æå®ãããŠããªãå ŽåãGitã¯ãã£ã¬ã¯ããªããªãŒã ~
ãŸã㯠/
ã«ãã©ãçããŸã§äžã£ãŠãããåãã£ã¬ã¯ããªã§ .git
ãã£ã¬ã¯ããªãæ¢ããŸãã
GIT_CEILING_DIRECTORIES
㯠.git
ãã£ã¬ã¯ããªãæ¢ãéã®åäœãå¶åŸ¡ããŸãã
èªã¿èŸŒã¿ãé
ããã£ã¬ã¯ããªã«ã¢ã¯ã»ã¹ããŠããå ŽåïŒäŸãã°ããŒããã©ã€ãäžã®ãã£ã¬ã¯ããªããäœéãªãããã¯ãŒã¯è¶ãã«ã¢ã¯ã»ã¹ããŠããå ŽåïŒãGitãèªåã§åæ¢ããã®ãåŸ
ããã«è©Šè¡ãåæ¢ãããããªãããšããããšæããŸããç¹ã«ãã·ã§ã«ããã³ãããæ§æããŠããæäžã«GitãåŒã°ããå Žåã¯ããã§ãããã
GIT_WORK_TREE
ã¯ããã¢ãªããžããªä»¥å€ã®ãªããžããªã§ãã¯ãŒãã³ã°ãã£ã¬ã¯ããªã®ã«ãŒããšãªãå Žæã§ãã
æå®ãããŠããªãå Žåã $GIT_DIR
ã®èŠªãã£ã¬ã¯ããªã代ããã«äœ¿çšãããŸãã
GIT_INDEX_FILE
ã¯ãã€ã³ããã¯ã¹ãã¡ã€ã«ã®ãã¹ã§ãïŒãã¢ãªããžããªä»¥å€ã§ã®ã¿äœ¿çšãããŸãïŒã
GIT_OBJECT_DIRECTORY
ã¯ãéåžž .git/objects
ã«ãããã£ã¬ã¯ããªã®å Žæãæå®ããã®ã«äœ¿çšã§ããŸãã
GIT_ALTERNATE_OBJECT_DIRECTORIES
ã¯ã GIT_OBJECT_DIRECTORY
ã«ãªããžã§ã¯ãããªãã£ãå Žåã«ãã§ãã¯ã«è¡ãå Žæãæ瀺ããã®ã«äœ¿ããŸããã³ãã³åºåãã®ãªã¹ãïŒ /dir/one:/dir/two:âŠ
ã®ãããªæžåŒïŒã§æå®ããŸãã
倧éã®ãããžã§ã¯ãã«ãå
šãåãå
容ã®å·šå€§ãªãã¡ã€ã«ããããšããç¶æ³ã§ããã®ãã¡ã€ã«ã倧éã«éè€ããŠä¿åããããªãå Žåã«ããããå©çšã§ããŸãã
Pathspec
âpathspecâ ãšã¯ãGitã«äœãã®ãã¹ãæå®ããæ¹æ³ã®ããšã§ãã¯ã€ã«ãã«ãŒãã®äœ¿çšæ³ãªã©ãå«ãŸããŸãã
以äžã®ç°å¢å€æ°ã¯ .gitignore
ãã¡ã€ã«ã ãã§ãªããã³ãã³ãã©ã€ã³ïŒ git add *.c
ãªã©ïŒã§ã䜿çšãããŸãã
GIT_GLOB_PATHSPECS
ããã³ GIT_NOGLOB_PATHSPECS
ã¯ãpathspec ã«ãããŠãã¯ã€ã«ãã«ãŒãã®ããã©ã«ãã®åäœãå¶åŸ¡ããŸãã
GIT_GLOB_PATHSPECS
ã«1ãã»ãããããŠããå Žåãã¯ã€ã«ãã«ãŒãæåã¯ã¯ã€ã«ãã«ãŒããšããŠåããŸãïŒãããããã©ã«ãã®æåïŒã GIT_NOGLOB_PATHSPECS
ã«1ãã»ãããããŠããå Žåãã¯ã€ã«ãã«ãŒãæåã¯ããèªèº«ã«ã®ã¿ããããã€ãŸã *.c
㯠.c
ã§çµããååã®ãã¡ã€ã«ãã¹ãŠã§ã¯ãªãã â*.câ ãšããååã® ãã¡ã€ã«ã«ã®ã¿ãããããŸãã
pathspec ã« :(glob)
ã :(literal)
ãã :(glob)*.c
ã®ããã«æå®ããããšã§ãåã
ã®ã±ãŒã¹ã«å¯ŸããŠããåªå
çãªèšå®ãè¡ãããšãã§ããŸãã
GIT_LITERAL_PATHSPECS
ã¯äžèšã®æ¯ãèããäž¡æ¹ãšãç¡å¹ã«ããŸããã¯ã€ã«ãã«ãŒãæåã¯æ©èœãåæ¢ãããªãŒããŒã©ã€ãæ¥é èŸãç¡å¹åãããŸãã
GIT_ICASE_PATHSPECS
ã¯ãã¹ãŠã® pathspec ã倧æåå°æåãåºå¥ããåŠçããããã«èšå®ããŸãã
ã³ããã
Gitã®ã³ããããªããžã§ã¯ãã¯éåžžãæçµçã« git-commit-tree
ã«ãã£ãŠäœæãããŸãããã®ã³ãã³ãã¯ã以äžã®ç°å¢å€æ°ã«èšå®ãããŠããæ
å ±ãåªå
çã«äœ¿çšããŸãããããã®ç°å¢å€æ°ãååšããªãå Žåã«ã®ã¿ãèšå®ãã¡ã€ã«ã®å€ã代ããã«äœ¿çšãããŸãã
GIT_AUTHOR_NAME
㯠âauthorâ ãã£ãŒã«ãã«äœ¿çšãããã人éã«èªãã圢åŒã®ååã§ãã
GIT_AUTHOR_EMAIL
㯠âauthorâ ãã£ãŒã«ãã§äœ¿çšããã¡ãŒã«ã¢ãã¬ã¹ã§ãã
GIT_AUTHOR_DATE
㯠âauthorâ ãã£ãŒã«ãã§äœ¿çšããã¿ã€ã ã¹ã¿ã³ãã§ãã
GIT_COMMITTER_NAME
㯠âcommitterâ ãã£ãŒã«ãã§äœ¿çšãã人åã§ãã
GIT_COMMITTER_EMAIL
㯠âcommitterâ ãã£ãŒã«ãã§äœ¿çšããã¡ãŒã«ã¢ãã¬ã¹ã§ãã
GIT_COMMITTER_DATE
㯠âcommitterâ ãã£ãŒã«ãã§äœ¿çšããã¿ã€ã ã¹ã¿ã³ãã§ãã
EMAIL
ã¯ãèšå®å€ user.email
ãèšå®ãããŠããªãå Žåã«ä»£ããã«äœ¿çšãããã¡ãŒã«ã¢ãã¬ã¹ã§ãã
ãã®ç°å¢å€æ°èªäœã èšå®ãããŠããªãå ŽåãGitã¯ã·ã¹ãã ã®ãŠãŒã¶åãšãã¹ãåã代ããã«äœ¿çšããŸãã
ãããã¯ãŒã¯
Git ã¯HTTPè¶ãã®ãããã¯ãŒã¯æäœã« curl
ã©ã€ãã©ãªã䜿çšããŠããŸãããã®ããã GIT_CURL_VERBOSE
ã¯ãã®ã©ã€ãã©ãªãçæããã¡ãã»ãŒãžããã¹ãŠåºåããããGitã«æ瀺ããŸãã
ããã¯ã³ãã³ãã©ã€ã³ã§ curl -v
ãå®è¡ããã®ãšäŒŒããããªãã®ã§ãã
GIT_SSL_NO_VERIFY
ã¯ãSSL蚌ææžã®æ€èšŒãè¡ããªãããã«Gitãžæ瀺ããŸãã
ããã¯ãGitãªããžããªãHTTPSçµç±ã§å©çšããããã«èªå·±çœ²å蚌ææžã䜿ã£ãŠããå ŽåããGitãµãŒããŒã®ã»ããã¢ããäžã§æ£åŒãªèšŒææžã®ã€ã³ã¹ããŒã«ãå®äºããŠããªãå Žåãªã©ã«å¿
èŠã«ãªããŸãã
ããHTTPæäœã®ããŒã¿ã¬ãŒããç§é GIT_HTTP_LOW_SPEED_LIMIT
ãã€ãããäœãç¶æ
ãã GIT_HTTP_LOW_SPEED_TIME
ç§ããé·ãç¶ããå ŽåãGitã¯ãã®æäœãäžæããŸãã
ãããã®ç°å¢å€æ°ã¯èšå®ãã¡ã€ã«ã® http.lowSpeedLimit
ããã³ http.lowSpeedTime
ã®å€ããåªå
ãããŸãã
GIT_HTTP_USER_AGENT
ã¯GitãHTTPã§éä¿¡ããéã®user-agentæååãèšå®ããŸãã
ããã©ã«ãã®å€ã¯ git/2.0.0
ã®ãããªå
容ã§ãã
å·®åååŸãšããŒãž
GIT_DIFF_OPTS
ã§ãããããã¯ååã®ä»ãæ¹ã«å°ãåé¡ãããšèšããŸãã
æå¹ãªå€ã¯ -u<n>
ãŸã㯠--unified=<n>
ã ãã§ããããã¯ã git diff
ã³ãã³ãã§è¡šç€ºãããã³ã³ããã¹ãè¡ã®è¡æ°ãå¶åŸ¡ããŸãã
GIT_EXTERNAL_DIFF
ã¯èšå®ãã¡ã€ã«ã® diff.external
ã®å€ããªãŒããŒã©ã€ãããŸãã
èšå®ãããŠããå Žåãããã§æå®ããããã°ã©ã ã git diff
ã®å®è¡æã«åŒã³åºãããŸãã
GIT_DIFF_PATH_COUNTER
ããã³ GIT_DIFF_PATH_TOTAL
ã¯ã GIT_EXTERNAL_DIFF
ãŸã㯠diff.external
ã§æå®ããããã°ã©ã ã®å
éšã§äœ¿çšãããšäŸ¿å©ã§ãã
åè
ã¯ãåŠçäžã®äžé£ã®ãã¡ã€ã«ã®äžã§äœçªç®ã®ãã¡ã€ã«ã®å·®åãåŠçããŠãããïŒ1ããå§ãŸãæ°å€ïŒãåŸè
ã¯åŠçäžã®äžé£ã®ãã¡ã€ã«ã®ç·æ°ã§ãã
-
GIT_MERGE_VERBOSITY
* ã¯ãååž°çãªããŒãžæŠç¥ã®åºåãå¶åŸ¡ããŸãã æå®ã§ããå€ã¯ä»¥äžã®éãã§ãã
-
0 ã¯äœãåºåããŸãããäŸå€ãšããŠããšã©ãŒããã£ãå Žåã¯ãšã©ãŒã¡ãã»ãŒãžã1ã€ã ãåºåããŸãã
-
1 ã¯ããŒãžã³ã³ããªã¯ãã®ã¿è¡šç€ºããŸãã
-
2 ã¯ãã¡ã€ã«ã®å€æŽç¹ã®ã¿è¡šç€ºããŸãã
-
3 ã¯å€æŽããªãåŠçãã¹ããããããã¡ã€ã«ã衚瀺ããŸãã
-
4 ã¯åŠçããããã¹ããã¹ãŠè¡šç€ºããŸãã
-
5 以äžãæå®ãããšãäžèšã®ãã¹ãŠã«å ããŠè©³çŽ°ãªãããã°çšã®æ å ±ã衚瀺ããŸãã
ããã©ã«ãå€ã¯2ã§ãã
ãããã°
GitãäœãããŠãããã æ¬åœã« ç¥ãããã§ããïŒ Gitã«ã¯ãçµã¿èŸŒã¿ã®ãã¬ãŒã¹ã®ã»ãŒå®å šãªã»ãããåãã£ãŠããããŠãŒã¶ãããå¿ èŠãããã®ã¯ããããããªã³ã«ããããšã ãã§ãã ãããã®ç°å¢å€æ°ã«èšå®å¯èœãªå€ã¯æ¬¡ã®éãã§ãã
-
âtrueâãâ1âãâ2â â 察象ã®ã«ããŽãªã®ãã¬ãŒã¹ã¯æšæºãšã©ãŒåºåãžæžãåºãããŸãã
-
/
ããå§ãŸã絶察ãã¹æåå â 察象ã®ãã¬ãŒã¹ã®åºåã¯ãã®ãã¡ã€ã«ãžæžãåºãããŸãã
GIT_TRACE
ã¯ãã©ã®ç¹å®ã®ã«ããŽãªã«ãåœãŠã¯ãŸããªããäžè¬çãªãã¬ãŒã¹ãå¶åŸ¡ããŸãã
ããã«ã¯ããšã€ãªã¢ã¹ã®å±éããä»ã®ãµãããã°ã©ã ãžã®åŠçã®åŒãæž¡ããªã©ãå«ãŸããŸãã
$ GIT_TRACE=true git lga
20:12:49.877982 git.c:554 trace: exec: 'git-lga'
20:12:49.878369 run-command.c:341 trace: run_command: 'git-lga'
20:12:49.879529 git.c:282 trace: alias expansion: lga => 'log' '--graph' '--pretty=oneline' '--abbrev-commit' '--decorate' '--all'
20:12:49.879885 git.c:349 trace: built-in: git 'log' '--graph' '--pretty=oneline' '--abbrev-commit' '--decorate' '--all'
20:12:49.899217 run-command.c:341 trace: run_command: 'less'
20:12:49.899675 run-command.c:192 trace: exec: 'less'
GIT_TRACE_PACK_ACCESS
ã¯ããã¯ãã¡ã€ã«ãžã®ã¢ã¯ã»ã¹ã«é¢ãããã¬ãŒã¹ãå¶åŸ¡ããŸãã
æåã®ãã£ãŒã«ãã¯ã¢ã¯ã»ã¹ãããŠããããã¯ãã¡ã€ã«ã次ã®ãã£ãŒã«ãã¯ãã®ãã¡ã€ã«å
ã§ã®ãªãã»ããã§ãã
$ GIT_TRACE_PACK_ACCESS=true git status
20:10:12.081397 sha1_file.c:2088 .git/objects/pack/pack-c3fa...291e.pack 12
20:10:12.081886 sha1_file.c:2088 .git/objects/pack/pack-c3fa...291e.pack 34662
20:10:12.082115 sha1_file.c:2088 .git/objects/pack/pack-c3fa...291e.pack 35175
# [âŠ]
20:10:12.087398 sha1_file.c:2088 .git/objects/pack/pack-e80e...e3d2.pack 56914983
20:10:12.087419 sha1_file.c:2088 .git/objects/pack/pack-e80e...e3d2.pack 14303666
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
GIT_TRACE_PACKET
ã¯ãããã¯ãŒã¯æäœã«ããããã±ããã¬ãã«ã®ãã¬ãŒã¹ãæå¹ã«ããŸãã
$ GIT_TRACE_PACKET=true git ls-remote origin
20:15:14.867043 pkt-line.c:46 packet: git< # service=git-upload-pack
20:15:14.867071 pkt-line.c:46 packet: git< 0000
20:15:14.867079 pkt-line.c:46 packet: git< 97b8860c071898d9e162678ea1035a8ced2f8b1f HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2.0.4
20:15:14.867088 pkt-line.c:46 packet: git< 0f20ae29889d61f2e93ae00fd34f1cdb53285702 refs/heads/ab/add-interactive-show-diff-func-name
20:15:14.867094 pkt-line.c:46 packet: git< 36dc827bc9d17f80ed4f326de21247a5d1341fbc refs/heads/ah/doc-gitk-config
# [âŠ]
GIT_TRACE_PERFORMANCE
ã¯æ§èœããŒã¿ã®ãã°åºåãå¶åŸ¡ããŸãã
ãã°ã«ã¯ãäžã€äžã€ã®GitåŒã³åºãã«ããã£ãæéãåºåãããŸãã
$ GIT_TRACE_PERFORMANCE=true git gc
20:18:19.499676 trace.c:414 performance: 0.374835000 s: git command: 'git' 'pack-refs' '--all' '--prune'
20:18:19.845585 trace.c:414 performance: 0.343020000 s: git command: 'git' 'reflog' 'expire' '--all'
Counting objects: 170994, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (43413/43413), done.
Writing objects: 100% (170994/170994), done.
Total 170994 (delta 126176), reused 170524 (delta 125706)
20:18:23.567927 trace.c:414 performance: 3.715349000 s: git command: 'git' 'pack-objects' '--keep-true-parents' '--honor-pack-keep' '--non-empty' '--all' '--reflog' '--unpack-unreachable=2.weeks.ago' '--local' '--delta-base-offset' '.git/objects/pack/.tmp-49190-pack'
20:18:23.584728 trace.c:414 performance: 0.000910000 s: git command: 'git' 'prune-packed'
20:18:23.605218 trace.c:414 performance: 0.017972000 s: git command: 'git' 'update-server-info'
20:18:23.606342 trace.c:414 performance: 3.756312000 s: git command: 'git' 'repack' '-d' '-l' '-A' '--unpack-unreachable=2.weeks.ago'
Checking connectivity: 170994, done.
20:18:25.225424 trace.c:414 performance: 1.616423000 s: git command: 'git' 'prune' '--expire' '2.weeks.ago'
20:18:25.232403 trace.c:414 performance: 0.001051000 s: git command: 'git' 'rerere' 'gc'
20:18:25.233159 trace.c:414 performance: 6.112217000 s: git command: 'git' 'gc'
GIT_TRACE_SETUP
ã¯Gitããªããžããªãç°å¢ãæäœããéã«äœãèŠãŠãããã衚瀺ããŸãã
$ GIT_TRACE_SETUP=true git status
20:19:47.086765 trace.c:315 setup: git_dir: .git
20:19:47.087184 trace.c:316 setup: worktree: /Users/ben/src/git
20:19:47.087191 trace.c:317 setup: cwd: /Users/ben/src/git
20:19:47.087194 trace.c:318 setup: prefix: (null)
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
ãã®ä»
GIT_SSH
ã¯ãæå®ãããŠããå ŽåãGitãSSHãã¹ããžæ¥ç¶ããéã« ssh
ã®ä»£ããã«åŒã³åºãããããã°ã©ã ã§ãã
ãã㯠$GIT_SSH [username@]host [-p <port>] <command>
ã®ããã«åŒã³åºãããŸãã
泚æäºé
ãšããŠããã㯠ssh
ã®åŒã³åºãæ¹ãã«ã¹ã¿ãã€ãºããæãæ軜ãªæ¹æ³ãšããããã§ã¯ãããŸãããè¿œå ã®ã³ãã³ãã©ã€ã³ãã©ã¡ã¿ããµããŒããããªãã®ã§ãã©ãããŒã¹ã¯ãªãããæžããŠã GIT_SSH
ããã®ã¹ã¯ãªãããæãããã«ããå¿
èŠããããŸãã
ãã®å Žåã¯åã« ~/.ssh/config
ãã¡ã€ã«ã䜿çšããæ¹ãç°¡åã§ãããã
GIT_ASKPASS
ã¯èšå®ãã¡ã€ã«ã® core.askpass
ã®å€ããªãŒããŒã©ã€ãããŸãã
ããã¯ãŠãŒã¶ã«ããèªèšŒæ
å ±ã®å
¥åãå¿
èŠãªãšãã«åŒã³åºãããããã°ã©ã ã§ãã³ãã³ãã©ã€ã³åŒæ°ãšããŠããã³ããã®ããã¹ããåãåããå¿çãæšæºåºåãžè¿ãããã«ãªã£ãŠããå¿
èŠããããŸãã
ïŒãã®ãµãã·ã¹ãã ã®è©³çŽ°ã«ã€ããŠã¯ èªèšŒæ
å ±ã®ä¿å ãåç
§ããŠãã ããïŒ
GIT_NAMESPACE
ã¯åå空éå
ã®åç
§ãžã®ã¢ã¯ã»ã¹å¶åŸ¡ãè¡ããŸãããã㯠--namespace
ãã©ã°ãšåæ§ã§ãã
ããããã£ãšã䟿å©ãªã®ã¯ããµãŒããŒã§äžã€ã®ãªããžããªã®è€æ°ã®ãã©ãŒã¯ãåäžã®ãªããžããªãžæ ŒçŽãããããåç
§ã ãã¯å¥ã
ã«åããŠããããå Žåã§ãã
GIT_FLUSH
ã¯ãGitã«éãããã¡I/Oã䜿çšããããã«åŒ·å¶ããŸããæšæºåºåãžã®æžãåºããé次çã«è¡ãããå Žåã«äœ¿çšããŸãã
1ãèšå®ãããšãGitã¯åºåãããé »ç¹ã«ãã©ãã·ã¥ããŸãã0ãèšå®ãããšããã¹ãŠã®åºåããããã¡ãªã³ã°ãããŸãã
ããã©ã«ãïŒãã®ç°å¢å€æ°ãèšå®ãããŠããªãå ŽåïŒã§ã¯ãåäœãšåºåã¢ãŒãã«åãããŠé©åãªãããã¡ãªã³ã°ã¹ããŒã ãéžæãããŸãã
GIT_REFLOG_ACTION
ã§ã¯ãreflogãžåºåããã説æçšã®ããã¹ããæå®ã§ããŸãã
次ã«äŸã瀺ããŸãã
$ GIT_REFLOG_ACTION="my action" git commit --allow-empty -m 'my message'
[master 9e3d55a] my message
$ git reflog -1
9e3d55a HEAD@{0}: my action: my message