사용자 도구

사이트 도구


git

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
git [2018/06/05 16:43]
kwon37xi
git [2019/06/26 19:21]
kwon37xi [파일 chmod 변경 - 특히 실행(x) 권한]
줄 23: 줄 23:
       * 이걸 해도 자소 분리 현상이 발생하면 ''user.name''을 다시 설정할 것.       * 이걸 해도 자소 분리 현상이 발생하면 ''user.name''을 다시 설정할 것.
     * SourceTree 사용자는 Preferences에서 **"Allow SourceTree to modify your global Mercurial and Git configuration files"** 체크 **해제**     * SourceTree 사용자는 Preferences에서 **"Allow SourceTree to modify your global Mercurial and Git configuration files"** 체크 **해제**
 +
 +===== Directory별 Include 설정 =====
 +  * [[https://git-scm.com/docs/git-config#_includes|Git - git-config Documentation]] ''IncludeIf'' 구문으로 작업 디렉토리별로 기본 git 설정을 할 수 있다. 
 +  * [[https://blog.outsider.ne.kr/1448?fbclid=IwAR2FDARy9VIerwVbPjpzXNv03aS58xRFFAMXnP5TrqxUZ6ZgT_OJqh7QfSs|Git 계정 여러 개 동시 사용하기]]
 +  * ''~/.gitconfig''에<code>
 +[includeIf "gitdir:~/my-personal-projects/"] #마지막 "/" 필수
 +  path = .git_personal_projects
 +</code>
 +  * ''~/.git_personal_proejcts''<code>
 +[user]
 +  email = kwon37xi@gmail.com
 +  name = KwonNamSon
 +</code>
  
 ===== Ubuntu Git 최신 버전 ===== ===== Ubuntu Git 최신 버전 =====
줄 162: 줄 175:
   * [[linux:powerline|Powerline]] 사용시 bash 테마를 ''default_leftonly''로 지정하면 아래 과정이 불필요하다.   * [[linux:powerline|Powerline]] 사용시 bash 테마를 ''default_leftonly''로 지정하면 아래 과정이 불필요하다.
   * [[http://code-worrier.com/blog/git-branch-in-bash-prompt/|Bash 프롬프트에 Git Branch 이름 보여주기]]<code sh>   * [[http://code-worrier.com/blog/git-branch-in-bash-prompt/|Bash 프롬프트에 Git Branch 이름 보여주기]]<code sh>
 +mkdir -p ~/.local/bin
 curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.local/bin/git-prompt.sh curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.local/bin/git-prompt.sh
  
줄 215: 줄 229:
 find . -type d -empty -exec touch {}/.gitkeep \; find . -type d -empty -exec touch {}/.gitkeep \;
 </code> </code>
 +
 +===== 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 변경하기
 +  * 아래는 Linux/*nix 계열에서는 불필요하고 작동하지도 않았다. 그냥 ''chmod'' 명령을 직접사용하면됨.
 +  * ''git ls-files %%--%%stage'' 명령으로 파일 권한 확인. 보통 ''100644''로 돼 있음.
 +  * ''git update-index %%--chmod=+x%% 'name-of-shell-script''' : 권한에 ''x'' 추가
 +  * ''git ls-files %%--%%stage''로 다시 확인해보면 **100755**로 변경됨.
 +  * commit 한다.
 +
  
 ===== 문제 해결 ===== ===== 문제 해결 =====
줄 241: 줄 264:
   * [[http://www-cs-students.stanford.edu/~blynn/gitmagic/|git magic]]   * [[http://www-cs-students.stanford.edu/~blynn/gitmagic/|git magic]]
   * [[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]]
git.txt · 마지막으로 수정됨: 2023/10/14 13:47 저자 kwon37xi