사용자 도구

사이트 도구


git

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
git [2019/06/08 21:43]
kwon37xi [Directory별 Include 설정]
git [2019/08/29 16:15]
kwon37xi
줄 1: 줄 1:
 ====== git ====== ====== git ======
   * http://git-scm.com/   * http://git-scm.com/
 +  * [[git:cheatsheet|Git Cheatsheet]]
  
 ===== Client 설정 ===== ===== Client 설정 =====
줄 28: 줄 29:
   * [[https://blog.outsider.ne.kr/1448?fbclid=IwAR2FDARy9VIerwVbPjpzXNv03aS58xRFFAMXnP5TrqxUZ6ZgT_OJqh7QfSs|Git 계정 여러 개 동시 사용하기]]   * [[https://blog.outsider.ne.kr/1448?fbclid=IwAR2FDARy9VIerwVbPjpzXNv03aS58xRFFAMXnP5TrqxUZ6ZgT_OJqh7QfSs|Git 계정 여러 개 동시 사용하기]]
   * ''~/.gitconfig''에<code>   * ''~/.gitconfig''에<code>
-[includeIf "gitdir:~/my-personal-projects/"]+[includeIf "gitdir:~/my-personal-projects/"#마지막 "/" 필수
   path = .git_personal_projects   path = .git_personal_projects
 </code> </code>
줄 132: 줄 133:
 ===== Git hook ===== ===== Git hook =====
   * 기본적으로는 ''projectdir/.git/hooks''에 후킹 파일을 둔다.   * 기본적으로는 ''projectdir/.git/hooks''에 후킹 파일을 둔다.
 +  * 2.9 부터는 ''projectdir/.githooks'' 에 후킹 스크립트를 넣는다.
   * 전역 Hook 파일 설정 (git 2.9+)<code sh>   * 전역 Hook 파일 설정 (git 2.9+)<code sh>
 git config --global core.hooksPath /path/to/my/centralized/hooks git config --global core.hooksPath /path/to/my/centralized/hooks
 </code> </code>
 +  * [[https://git-scm.com/book/ko/v2/Git%EB%A7%9E%EC%B6%A4-Git-Hooks|Git Hooks]]
  
 ===== Commit Template ===== ===== Commit Template =====
줄 230: 줄 233:
 </code> </code>
  
-===== 파일 chmod 변경 - 특히 실행(x) 권한 =====+===== Windows 등에서 파일 chmod 변경 - 특히 실행(x) 권한 =====
   * [[https://medium.com/@akash1233/change-file-permissions-when-working-with-git-repos-on-windows-ea22e34d5cee|Change file permissions when working with git repo’s on windows]] 윈도우에 파일 mod 변경하기   * [[https://medium.com/@akash1233/change-file-permissions-when-working-with-git-repos-on-windows-ea22e34d5cee|Change file permissions when working with git repo’s on windows]] 윈도우에 파일 mod 변경하기
-  * ''git ls-files --stage'' 명령으로 파일 권한 확인. 보통 ''100644''로 돼 있음. +  * 아래는 Linux/*nix 계열에서는 불필요하고 작동하지도 않았다. 그냥 ''chmod'' 명령을 직접사용하면됨. 
-  * ''git update-index --chmod=+x 'name-of-shell-script''' : 권한에 ''x'' 추가 +  * ''git ls-files %%--%%stage'' 명령으로 파일 권한 확인. 보통 ''100644''로 돼 있음. 
-  * ''git ls-files --stage''로 다시 확인해보면 **100755**로 변경됨.+  * ''git update-index %%--chmod=+x%% 'name-of-shell-script''' : 권한에 ''x'' 추가 
 +  * ''git ls-files %%--%%stage''로 다시 확인해보면 **100755**로 변경됨.
   * commit 한다.   * commit 한다.
  
줄 264: 줄 268:
   * [[https://www.cyberciti.biz/open-source/github-alternatives-open-source-seflt-hosted/|6 Github alternatives that is open source and self-hosted - nixCraft]]   * [[https://www.cyberciti.biz/open-source/github-alternatives-open-source-seflt-hosted/|6 Github alternatives that is open source and self-hosted - nixCraft]]
   * [[https://johngrib.github.io/wiki/git-alias/|편리한 git alias 설정하기 - 기계인간 John Grib]]   * [[https://johngrib.github.io/wiki/git-alias/|편리한 git alias 설정하기 - 기계인간 John Grib]]
 +  * [[https://blog.ull.im/engineering/2019/03/10/logs-on-git.html|좋은 git commit 메시지를 위한 영어 사전]]
git.txt · 마지막으로 수정됨: 2023/10/14 13:47 저자 kwon37xi