error: Your local changes to the following files would be overwritten by merge: .DS_Store
1315 단어 git
Git ignore .gitignore :
error: Your local changes to the following files would be overwritten by merge: .DS_Store
both modified: .DS_Store
해결 방법:
만약 당신이push 후에 원격 창고가 당신을 추적할 것입니다.DS_스토어 파일, 다른 사람도 이 파일을 제출하면 충돌을 일으킬 수 있습니다.일반적으로 이 파일은 첫 번째 push 전에 ignore 목록에 추가됩니다.git rm -r --cached .DS_Store
이 코드는 추적을 해제하고 캐시를 제거하는 것을 의미한다.git rm --cached filename
만약 여전히 안 된다면 다음과 같은 절차에 따라 집행해야 한다.mv .gitignore .gitignore_bak
git checkout .DS_Store
git rm -r --cached .DS_Store
mv .gitignore_bak .gitignore
아니면 이렇게 하려고 할 수도 있습니다.git stash
git pull
git stash pop
새 프로젝트는 우선 ignore를 제출해야 합니다
이것은 첫 번째 임무이다. 그렇지 않으면 충돌과 현지화된 서류가 많이 제출되어 팀워크에 영향을 줄 것이다.그래서lib를 만들 때 the first things는 하나를 만듭니다.gitignore 파일.Github에 ignore 프로젝트가 있습니다. 언어에 따라 다른 종류의 ignore 템플릿이 준비되어 있습니다. 다운로드하러 가세요.
전역 ignore와 국부 ignore
:
error: Your local changes to the following files would be overwritten by merge: .DS_Store
both modified: .DS_Store
git rm -r --cached .DS_Store
mv .gitignore .gitignore_bak
git checkout .DS_Store
git rm -r --cached .DS_Store
mv .gitignore_bak .gitignore
git stash
git pull
git stash pop
.git/info/exclude
.gitignore,
.gitignore, exclude
Ignore , 。
~/.gitconfig gitignore
[core]
excludesfile =/Users/duofei/.gitignore_global
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Heroku H10/503 오류 해결 방법 - 이야기오후 2시 30분까지 내 이해 수준에 따라 배포할 준비가 된 내 코드 를 완성했습니다. 몇 달 전에 플랫폼에 Node.js 앱을 배포하여 을 따르기로 결정했습니다. How to solve Heroku H10 erro...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.