This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git [2016/05/13 15:38] – [rebase] ledyx | git [2021/02/07 03:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| = Git = | = Git = | ||
| - | 참고 | + | * 참고 |
| - | https:// | + | |
| - | https:// | + | https:// |
| - | https:// | + | https:// |
| + | https:// | ||
| {{tag> | {{tag> | ||
| Line 52: | Line 53: | ||
| <sxh bash> | <sxh bash> | ||
| git add <FILE 이름> | git add <FILE 이름> | ||
| + | </ | ||
| + | |||
| + | ==== 모든 비어있는 디렉토리 추가 ==== | ||
| + | <sxh bash> | ||
| + | git clean -nd | sed s/' | ||
| </ | </ | ||
| Line 99: | Line 105: | ||
| == Branch 병합 == | == Branch 병합 == | ||
| + | ^ merge | ||
| + | | 모든 이력 남음.\\ (정확한 이력 저장 용도) | ||
| + | |||
| + | * 적절한 사용 예 | ||
| + | * https:// | ||
| + | |||
| === merge === | === merge === | ||
| Line 191: | Line 203: | ||
| #< | #< | ||
| ## 이어서 "~ 혹은 ^"를 붙이면 개수만큼 되돌림. | ## 이어서 "~ 혹은 ^"를 붙이면 개수만큼 되돌림. | ||
| + | |||
| + | #지정한 < | ||
| </ | </ | ||
| + | |||
| + | ===== 관례 ===== | ||
| + | * 남기는 Commit message 앞에는 접두어로 **pick** 붙인다. | ||
| + | * 없애는 Commit message 앞에는 접두어로 **fixup** 붙인다. | ||
| + | * **Commit SHA-1 Checksum 값**은 꼭 남겨야 한다. | ||
| + | * 기존의 Commit message를 수정하지 않는다. | ||
| Line 299: | Line 319: | ||
| git commit --amend | git commit --amend | ||
| </ | </ | ||
| + | |||
| + | |||
| + | == Untracking files 삭제 == | ||
| + | |||
| + | <sxh bash> | ||
| + | git clean < | ||
| + | |||
| + | #< | ||
| + | ## -f : 파일만 | ||
| + | ## -fd : 파일 & 디렉토리 전부 | ||
| + | |||
| + | # | ||
| + | </ | ||
| + | |||
| Line 335: | Line 369: | ||
| # URL 대신 로컬 저장소도 복제 가능! | # URL 대신 로컬 저장소도 복제 가능! | ||
| </ | </ | ||
| + | |||
| + | === 특정 Directory pull === | ||
| + | <sxh bash ; highlight: | ||
| + | // pull 대상 Directory 생성하고 | ||
| + | git init | ||
| + | git remote add -f origin URL | ||
| + | git config core.sparseCheckout true | ||
| + | echo " | ||
| + | git pull origin master | ||
| + | </ | ||
| + | |||
| Line 389: | Line 434: | ||
| <code bash> | <code bash> | ||
| # Shell path (64x 기준) | # Shell path (64x 기준) | ||
| - | C:\Program Files\Git\bin\sh.exe | + | "C:\Program Files\Git\bin\sh.exe" |
| </ | </ | ||