사용자 도구

사이트 도구


tool:git

차이

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

차이 보기로 링크

양쪽 이전 판이전 판
tool:git [2020/06/07 17:21] kieunstool:git [2024/04/23 22:43] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
 +{{htmlmetatags>metatag-robots=() 
 +metatag-keywords=(깃,git,kieuns) 
 +metatag-description=(깃 팁 사용법 kieuns)
 +metatag-media-og:image=(https://git-scm.com/images/logo@2x.png)
 +metatag-og:description=(깃 팁 사용법 kieuns)
 +metatag-og:any=(깃 팁 사용법 kieuns)
 +}}
  
 +====== 리파지토리의 설정 보기 ======
 +
 +  git config -l
 +
 +현재 설정 상태를 모두 볼 수 있다.
 +
 +====== 대소문자 구분 CaseSensitive ======
 +
 +깃의 기본 설정을 대소문자를 구분하지 않는 것.
 +
 +하지만 설정을 바꿔서 대소문자를 구분하게 할 수 있음.
 +
 +  git config core.ignorecase false
 +
 +보통은 신경 쓸일이 없는데, 유니티에서 파일 이름의 대소문자를 바꿨다가 낭패 봤던 경우가 있어서..
 +바꿨던 본인은 문제 없겠지만 내려 받아서 쓰는 쪽에서는 문제가 생겨서 골치 아팠던 적이 있다.
 +
 +====== Git for WINDOWs 깃 포 윈도우즈 ======
 +
 +===== 자동 업데이트 수동 실행 =====
 +
 +**Git for windows** 프로그램에 자동 업데이트 기능이 방화벽에 막힐때, 수동으로 실행할 커맨드.
 +
 +  * Git-Bash 실행
 +
 +커맨드에 아래 커맨드 입력
 +
 +<code>
 +> git update-git-for-windows --gui
 +</code>
 +
 +자동 업데이트 스케쥴러는
 +
 +  * 윈도우키 눌러서 검색창에서 **작업스케쥴러** 검색
 +  * **작업스케쥴러** 실행
 +  * **작업 스케쥴러 라이브러리** 의 여러 항목 중 **Git for Windows Updater** 에 실행되는 커맨드가 적혀 있다.
 +
 +====== git-lfs 쓰다가 복원하려면 ======
 +
 +  * 질문 사이트 : https://stackoverflow.com/questions/35011366/move-git-lfs-tracked-files-under-regular-git
 +
 +<질문>
 +
 +I have a project where I stored video files with Git LFS. Now I ran into some complications with my build server that doesn't yet support Git LFS. As it's an external service, I can't really affect the build process, and thus would want to move the files from under Git LFS back to "regular" Git. I managed to untrack the file types with <code bash>git lfs untrack '<file-type>'</code> but <code bash>git lfs ls-files</code> still gives a list of the files previously added.
 +
 +I imagine I could remove the files, push the changes and then manually re-add them, but is this really the recommended way of doing things?
 +
 +<대답>
 +
 +I had problems doing steps in Windows. To remove all git lfs tracked files and restore original file I did the following in git bash:
 +
 +Removed .gitattributes
 +
 +<code bash>
 +git lfs ls-files | cut -d ' ' -f 3 > lfs-files.txt
 +</code>
 +
 +Execute following snippet:
 +
 +Snippet:
 +
 +<code bash>
 +while read file; do
 +  git lfs untrack "$file";
 +  git rm --cached "$file";
 +  git add --force "$file";
 +done <lfs-files.txt
 +</code>
tool/git.txt · 마지막으로 수정됨: 2024/04/23 22:43 저자 127.0.0.1