👾𝗚𝗶𝘁

.DS_Store 삭제 방법

안오늘 2021. 6. 22. 21:50
  • 저장소 상위 디렉토리 기준 .DS_Store 파일 제거 (현재 디렉토리 아래의 모든 파일)
    find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
    • (추가) 앞으로 .DS_Store 파일을 업로드 안하고 싶다면
      • 저장소 상위 디렉토리에 .gitignore 파일 생성 및 .DS_Store 파일 추가
        echo .DS_Store >> .gitignore
  • 변경 사항을 원격 저장소에 push
    git add .
    git commit -m '.DS_Store removed'
    git push origin main