본문 바로가기

반응형

Git

(3)
Git Checkout 충돌 해결: 유실을 감수하는 방법 vs 안전한 방법 Git을 사용하시다 보면 브랜치를 전환하려 할 때, 아래와 같은 에러 메시지를 마주하실 수 있습니다:error: Your local changes to the following files would be overwritten by checkout: some/file.txtPlease commit your changes or stash them before you switch branches.이 메시지는 로컬에서 수정한 파일이 전환하려는 브랜치에서도 변경되어 있어서, Git이 해당 파일의 변경사항을 잃지 않도록 막고 있다는 의미입니다.하지만 때로는 해당 변경사항이 불필요하거나 유실되어도 괜찮은 경우가 있고, 반대로 절대로 놓치고 싶지 않은 중요한 작업일 수도 있습니다. 이 글에서는 두 경우 모두를 안..
Git에서 'Permission denied' 오류 해결 방법 Git을 사용하다 보면 cannot update the ref 'refs/remotes/origin/dev': unable to append to '.git/logs/refs/remotes/origin/dev': Permission denied 오류를 만날 수 있습니다. 이는 파일 접근 권한 문제로 인해 발생하는데, 이를 해결하는 방법을 단계별로 정리해 보았습니다.1. 파일 권한 확인 및 수정우선, 문제가 발생한 파일의 소유권과 권한을 확인해야 합니다.ls -l .git/logs/refs/remotes/origin/dev결과를 확인했을 때, 파일 소유자가 현재 로그인한 사용자와 다르다면 소유권을 변경해야 합니다.sudo chown -R $(whoami) .git/또는 Git 폴더 전체에 쓰기 권한을 부여..
[GIT] vscode git auto login(git credential) 설정 https://git-scm.com/docs/git-credential-store Git - git-credential-store DocumentationIf not set explicitly with --file, there are two files where git-credential-store will search for credentials in order of precedence: ~/.git-credentials User-specific credentials file. $XDG_CONFIG_HOME/git/credentials Second user-specific credentials file.git-scm.com$ git config credential.helper store위와 같이 설정 ..

반응형