Git 에러에러
error: Cannot delete branch currently checked outerror: Cannot delete current branch
현재 체크아웃된 브랜치는 삭제할 수 없습니다.
gitlinuxwindowsmacos
이 에러의 원인
Git은 현재 체크아웃된 브랜치의 삭제를 허용하지 않습니다. 먼저 다른 브랜치로 전환해야 합니다.
수정 방법
먼저 다른 브랜치로 전환한 뒤 git checkout main을 실행하고, 그다음 삭제하세요: git branch -d branch-to-delete. 병합되지 않은 브랜치를 강제로 삭제하려면 -d 대신 -D를 사용하세요.
관련 에러 코드
Git 에러에러
fatal: ambiguous argumentfatal: ambiguous argument
인수가 리비전인지, 경로인지, 또는 다른 무언가인지 Git이 판단할 수 없습니다.
gitlinuxwindowsmacos
상세 보기 Git 에러에러
fatal: shallow update not allowedfatal: shallow update not allowed
얕은 클론에서의 push가 거부되었습니다. 원격이 얕은 업데이트를 허용하지 않습니다.
gitlinuxwindowsmacos
상세 보기 Git 에러에러
fatal: bad objectfatal: bad object
참조된 Git 객체가 존재하지 않거나 손상되었습니다.
gitlinuxwindowsmacos
상세 보기 Git 에러에러
fatal: Not possible to fast-forward, abortingfatal: Not possible to fast-forward, aborting
브랜치가 분기되어 --ff-only 옵션을 사용한 pull이 실패했습니다.
gitlinuxwindowsmacos
상세 보기 Git 에러에러
fatal: branch is already checked out at another worktreefatal: 브랜치가 다른 워크트리에 이미 체크아웃됨
다른 워크트리에 이미 체크아웃된 브랜치이므로 체크아웃할 수 없습니다.
gitlinuxwindowsmacos
상세 보기 Git 에러에러
fatal: Authentication failedfatal: Authentication failed
원격 서버와의 Git 인증에 실패했습니다.
gitlinuxwindowsmacos
상세 보기