문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
git [2020/08/04 22:23] kwon37xi [Password with Gnome-Keyring] |
git [2023/10/14 13:47] kwon37xi |
||
---|---|---|---|
줄 2: | 줄 2: | ||
* http:// | * http:// | ||
* [[git: | * [[git: | ||
+ | * [[git: | ||
+ | * [[https:// | ||
===== Ubuntu 최신 버전 install ===== | ===== Ubuntu 최신 버전 install ===== | ||
줄 54: | 줄 56: | ||
</ | </ | ||
+ | ===== diff & difftool ===== | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
- | ===== Password Cache ===== | + | <code sh> |
- | * HTTP(S) 프로토콜의 경우 명령행에서는 비밀번호 저장해두기가 곤란하다. 그래서 캐시를 사용한다. | + | git difftool -t meld |
- | * [[http://dogfeet.github.io/articles/2013/git-password-caching.html|Git | + | git mergetool -t kdiff3 |
- | * Linux에서는 다음 처리로 간편하게 캐시가 끝난다.< | + | </ |
- | # 기본 캐시 시간 15분 | + | ===== Git Diff/Merge -> kdiff3 |
- | git config --global credential.helper cache | + | * [[https://docs.kde.org/trunk5/en/extragear-utils/ |
- | + | * 파일 삭제 diff시에 잘 작동 안함. | |
- | # 캐시 시간 지정 | + | * https:// |
- | git config --global credential.helper 'cache --timeout=7200' | + | < |
+ | [diff] | ||
+ | tool = kdiff3 | ||
+ | [difftool " | ||
+ | path = / | ||
+ | [difftool] | ||
+ | prompt | ||
+ | keepBackup = false | ||
+ | trustExitCode = false | ||
+ | [merge] | ||
+ | tool = kdiff3 | ||
+ | [mergetool] | ||
+ | prompt = false | ||
+ | keepBackup = false | ||
+ | keepTemporaries = false | ||
+ | [mergetool " | ||
+ | path = / | ||
</ | </ | ||
- | ===== libsecret 기반 credential | + | ===== Git Difftool/ |
- | * [[https://www.softwaredeveloper.blog/git-credential-storage-libsecret|Libsecret | + | * http://wiredforcode.com/blog/2011/06/04/git-with-meld-diff-viewer-on-ubuntu/ |
- | * [[https:// | + | * [[https:// |
- | * '' | + | * [[http:// |
- | ===== Password with Gnome-Keyring | + | < |
- | * deprecated. | + | # ------------------ M E R G E ------------------------- |
- | * 사용하지 말 것. '' | + | [merge] |
- | * [[http:// | + | tool = meld |
- | ===== Password with kde ===== | + | [mergetool " |
- | * [[https:// | + | |
- | * [[https:// | + | |
- | ===== Windows ===== | + | |
- | * [[https:// | + | |
- | * Unicode 깨짐 문제가 발생함 [[https:// | + | |
- | # cmd | + | |
- | set LC_ALL=C.UTF-8 | + | |
- | # powershell | + | [mergetool] |
- | $env:LC_ALL=' | + | |
+ | | ||
- | # 시스템 환경변수에 넣어둘 것 | + | |
- | </ | + | |
- | ===== Git Diff -> meld ===== | + | # ------------------ D I F F ------------------------- |
- | * http:// | + | [diff] |
- | * '' | + | guitool = meld |
- | #!/bin/sh | + | |
- | meld " | + | |
- | </ | + | |
- | * add to '' | + | |
- | git config | + | |
- | </ | + | |
- | ===== Git Mergetool -> meld ===== | + | [difftool " |
- | * 전역 설정 <code sh> | + | cmd = meld \" |
- | git config | + | |
</ | </ | ||
===== Git Diff -> vimdiff ===== | ===== Git Diff -> vimdiff ===== | ||
+ | * [[vim: | ||
* [[http:// | * [[http:// | ||
* '' | * '' | ||
줄 120: | 줄 132: | ||
* 설정의 external 무시하고 vim을 pager로< | * 설정의 external 무시하고 vim을 pager로< | ||
git diff --no-ext-diff -w | vim -R - | git diff --no-ext-diff -w | vim -R - | ||
+ | </ | ||
+ | * 그냥 명령을 직접 주기< | ||
+ | git diff -y -t vimdiff | ||
+ | # -y 는 no prompt | ||
</ | </ | ||
===== .gitignore ===== | ===== .gitignore ===== | ||
줄 145: | 줄 161: | ||
</ | </ | ||
- | ===== Git hook ===== | ||
- | * 기본적으로는 '' | ||
- | * 2.9 부터는 '' | ||
- | * 전역 Hook 파일 설정 (git 2.9+)< | ||
- | git config --global core.hooksPath / | ||
- | </ | ||
- | * [[https:// | ||
===== Commit Template ===== | ===== Commit Template ===== | ||
줄 244: | 줄 253: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | * [[http:// | + | * [[git:tig|tig]] 콘솔 기반 리포지토리 브라우저 |
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
줄 251: | 줄 260: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[https:// | ||
===== 빈 디렉토리 (empty directory) 유지 ===== | ===== 빈 디렉토리 (empty directory) 유지 ===== | ||
줄 267: | 줄 277: | ||
* commit 한다. | * commit 한다. | ||
+ | ===== shallow update not allowed ===== | ||
+ | * '' | ||
+ | * [[https:// | ||
+ | |||
+ | <code sh> | ||
+ | git fetch --unshallow origin | ||
+ | |||
+ | # 이후에 | ||
+ | git push | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== git blame ignore ===== | ||
+ | * [[https:// | ||
+ | * bulk 갱신, 포맷팅 변경 같은 경우 blame 에 자꾸 나오면 오히려 불편함. 특정 commit 을 blame에서 제외하기 | ||
+ | * [[https:// | ||
+ | |||
+ | ===== submodules ===== | ||
+ | * git 에서 다른 리포지토리를 디렉토리로 링크할 수 있음. | ||
+ | * https:// | ||
+ | * submodule 이 있는 리포지토리를 올바로 clone 하려면 '' | ||
+ | |||
+ | <code sh> | ||
+ | git clone --recursive < | ||
+ | </ | ||
===== 문제 해결 ===== | ===== 문제 해결 ===== | ||
줄 297: | 줄 332: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |