Tool/Git

UserInterfaceState.xcuserstate 제거

Brad_Heo 2024. 7. 17. 15:36

git으로 코드 관리 시 코드 변경을 안했음에도 UserInterfaceState.xcuserstate 파일 변경되었다고 경고가 나온다.

브랜치를 변경한다거나 머지할때 거슬린다.

UserInterfaceState.xcuserstate란 무엇일까?

-> UI 상태를 저장하고 있는 파일이다. 특별히 쓰임새가 없기에 제거해도 문제가 없다.

제거하는 방법

명령어

터미널에 아래 명령어 입력한다.

git rm --cached [Project Name].xcworkspace/xcuserdata/[User Name].xcuserdatad/UserInterfaceState.xcuserstate

성공적으로 삭제되면 해당 변경사항을 commit 한다.

gitignor

gitignor에 아래 내용 추가

*.xcuserstate

본인은 제대로 적용이 안되는건지, 동일한 현상이 나왔다.