728x90
반응형
질문 : Git 저장소에서 .DS_Store 파일을 제거하려면 어떻게해야합니까?
Git 저장소에서 이러한 성가신 Mac OS X .DS_Store
답변
저장소에서 기존 파일을 제거하십시오.
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
다음 줄을 추가하십시오.
.DS_Store
.gitignore
파일에 추가합니다 (또는 아직없는 경우 파일을 만듭니다). 최상위 디렉토리에서 다음 명령을 사용하여 쉽게 수행 할 수 있습니다.
echo .DS_Store >> .gitignore
그런 다음 파일을 저장소에 커밋합니다.
git add .gitignore git commit -m '.DS_Store banished!'
출처 : https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository
728x90
반응형
'개발관련 > Git' 카테고리의 다른 글
삭제 된 줄을 "git blame" 하는 방법 (0) | 2022.03.29 |
---|---|
git "Commit your changes or stash them before you can merge" (0) | 2022.03.29 |
병합 충돌을 일으키는 git stash pop 실행 취소 명령어 (0) | 2022.03.29 |
Git 푸시할 때 로그인을 생략하는 방법 (ssh 활용) (0) | 2022.03.26 |
GitHub와 Gist의 차이점 (0) | 2022.03.26 |