본문 바로가기
개발/게임) 개발관련

문제해결)Git) error: Your local changes to the following files would be overwritten by checkout:

by 테샤르 2023. 1. 25.

error: Your local changes to the following files would be overwritten by checkout:

 

checkout을 하는 과정에서 발생한 에러이다.

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks checkout -b 23_03 --track origin/23_03
error: Your local changes to the following files would be overwritten by checkout:
	Projects/ProjectSettings/PackageManagerSettings.asset
	Projects/ProjectSettings/PackageManagerSettings.asset
Please commit your changes or stash them before you switch branches.
error: The following untracked working tree files would be overwritten by checkout:
	Projects/Assets/FirebaseSettingFile.meta
	Projects/Assets/StreamingAssets.meta
Please move or remove them before you switch branches.
Aborting

 

반응형

간략하게 에러 상태를 확인해보면 알수있다.

 

Please commit your changes or stash them before you switch branches.

checkout 하기 전에 commit 이나 stash 명령어를 통해서 해당 로컬 저장소에있는것을 모두다 정리하고 난 이후에 

branch를 변경하라는 내용이다.

 

대체적으로 지금의 저장소의 상태를 확인해보면 알수있다. 

git stash

 

 

본인은 해당 두가지 파일이 중복해서 업로드되서 생긴 문제였다.

Projects/Assets/FirebaseSettingFile.meta
Projects/Assets/StreamingAssets.meta

 

해당 .mata 파일을 삭제하고 난 이후에 다시 checkout했다.

 

★☆☆☆☆

 

반응형

댓글