개발관련/Git
[MacOs] Git 저장소에서 .DS_Store 파일을 제거하는 방법
Rateye
2022. 3. 29. 13:17
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
반응형