[Git] Your local changes to the following files would be overwritten by chekcout
·
dev/Git
error: Your local changes to the following files would be overwritten by checkout: NimdaLandingPage/package-lock.jsonPlease commit your changes or stash them before you switch branches.Aborting 현재 브랜치의 파일과 이동하고자 하는 브랜치의 파일이 일치하지 않을 때 발생하는 오류이다.해결 방안은 현재 브랜치의 변경 사항을 커밋하거나 stash 명령어를 사용해 현재 브랜치의 변경사항을 임시로 저장한 뒤 이동할 브랜치에서 작업을 마치고 다시 되돌아와서 임시로 저장한 내용을 제거하면 된다. git stash git stash list로 stash된 파일 이력..
[Git] Branch Protection Rule
·
dev/Git
해당 글은 Github에서 Branch를 보호하는 룰을 설정하는 방법에 대해 다룬다. 특히 팀 협업에 있어서 Main Branch의 Rule을 설정하는 것은 매우 중요하다. 우선 Team Repository에 들어가 브랜치 규칙을 할당할 팀을 먼저 생성한다. Branch Name & Enforcement StatusRepository Settings Rulesets로 들어가 Ruleset Name, Enforcement Status를 Active한다. Bypass list Rulset을 무시하고 직접 브랜치에 Merge, Push 가능한 Organization Group을 설정한다. 프로젝트 리더나 중요한 멤버만 설정할 수 있도록 하자. Target branches BranchRule을 적용할 Br..