문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
git [2020/08/16 23:13] kwon37xi [Password with kde] |
git [2021/07/09 15:15] kwon37xi |
||
---|---|---|---|
줄 2: | 줄 2: | ||
* http:// | * http:// | ||
* [[git: | * [[git: | ||
+ | * [[git: | ||
+ | * [[https:// | ||
===== Ubuntu 최신 버전 install ===== | ===== Ubuntu 최신 버전 install ===== | ||
줄 54: | 줄 56: | ||
</ | </ | ||
+ | ===== diff & difftool ===== | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
- | ===== Password Cache ===== | ||
- | * HTTP(S) 프로토콜의 경우 명령행에서는 비밀번호 저장해두기가 곤란하다. 그래서 캐시를 사용한다. | ||
- | * [[http:// | ||
- | * Linux에서는 다음 처리로 간편하게 캐시가 끝난다.< | ||
- | # 기본 캐시 시간 15분 | ||
- | git config --global credential.helper cache | ||
- | |||
- | # 캐시 시간 지정 | ||
- | git config --global credential.helper 'cache --timeout=7200' | ||
- | </ | ||
- | |||
- | ===== libsecret 기반 gnome-keyring credential ===== | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * '' | ||
- | * [[https:// | ||
<code sh> | <code sh> | ||
- | sudo apt-get install libsecret-1-0 libsecret-1-dev | + | git difftool |
- | cd /usr/share/doc/git/contrib/credential/libsecret | + | git mergetool |
- | sudo make | + | </ |
- | git config --global credential.helper | + | ===== Git Diff/ |
+ | * [[https://docs.kde.org/trunk5/en/extragear-utils/kdiff3/git.html|Using KDiff3 as a Git Diff and Merging Tool]] | ||
+ | * 파일 삭제 diff시에 잘 작동 안함. | ||
+ | * https:// | ||
+ | < | ||
+ | [diff] | ||
+ | tool = kdiff3 | ||
+ | [difftool " | ||
+ | path = /usr/bin/kdiff3 | ||
+ | [difftool] | ||
+ | prompt = false | ||
+ | keepBackup = false | ||
+ | trustExitCode = false | ||
+ | [merge] | ||
+ | tool = kdiff3 | ||
+ | [mergetool] | ||
+ | prompt = false | ||
+ | keepBackup = false | ||
+ | keepTemporaries = false | ||
+ | [mergetool " | ||
+ | path = / | ||
</ | </ | ||
- | ===== SSH 인증 저장소 | + | ===== Git Difftool/ |
- | * [[https://www.softwaredeveloper.blog/store-git-ssh-credentials-in-linux|Store Git SSH key pair in Linux with Libsecret | + | * http:// |
+ | * [[https://stackoverflow.com/ | ||
+ | * [[http://blog.marcinchwedczuk.pl/use-meld-as-git-merge-diff-tool|How to use Meld as git merge and diff tool]] : '' | ||
- | ===== Password with Gnome-Keyring : Deprecated from 2014 ===== | + | < |
- | * deprecated. | + | # ------------------ M E R G E ------------------------- |
- | * 사용하지 말 것. '' | + | [merge] |
- | * [[http:// | + | tool = meld |
- | ===== Password with kde ===== | + | [mergetool " |
- | * [[https:// | + | cmd = meld --auto-merge \" |
- | * [[https:// | + | |
- | * [[https:// | + | |
- | * [[https:// | + | |
+ | [mergetool] | ||
+ | # don't ask if we want to skip merge | ||
+ | prompt = false | ||
- | ===== Windows ===== | + | # don't create backup |
- | | + | |
- | * Unicode 깨짐 문제가 발생함 [[https:// | + | |
- | # cmd | + | |
- | set LC_ALL=C.UTF-8 | + | |
- | # powershell | + | # ------------------ D I F F ------------------------- |
- | $env: | + | [diff] |
- | + | guitool = meld | |
- | # 시스템 환경변수에 넣어둘 것 | + | |
- | </ | + | |
- | + | ||
- | ===== Git Diff -> meld ===== | + | |
- | * http:// | + | |
- | * '' | + | |
- | #!/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:// | ||
* '' | * '' | ||
줄 134: | 줄 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 ===== | ||
줄 258: | 줄 260: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | * [[http:// | + | * [[git:tig|tig]] 콘솔 기반 리포지토리 브라우저 |
* [[https:// | * [[https:// | ||
* [[http:// | * [[http:// | ||
줄 265: | 줄 267: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[https:// | ||
===== 빈 디렉토리 (empty directory) 유지 ===== | ===== 빈 디렉토리 (empty directory) 유지 ===== | ||
줄 280: | 줄 283: | ||
* '' | * '' | ||
* commit 한다. | * commit 한다. | ||
+ | |||
+ | ===== shallow update not allowed ===== | ||
+ | * '' | ||
+ | * [[https:// | ||
+ | |||
+ | <code sh> | ||
+ | git fetch --unshallow origin | ||
+ | |||
+ | # 이후에 | ||
+ | git push | ||
+ | </ | ||
+ | ===== git blame ignore ===== | ||
+ | * [[https:// | ||
+ | * bulk 갱신, 포맷팅 변경 같은 경우 blame 에 자꾸 나오면 오히려 불편함. 특정 commit 을 blame에서 제외하기 | ||
+ | * [[https:// | ||
===== 문제 해결 ===== | ===== 문제 해결 ===== | ||
* [[http:// | * [[http:// | ||
줄 311: | 줄 329: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// |