본문으로 바로가기

[git ] Couldn't checkout branch_name

category Git 2023. 6. 13. 19:42

: Android Studio 에서 git 사용중 Couldn't checkout branch_name 발생시  처리내용입니다.

  : 위 에러가 발생하면 git 명령 동작하는게 없네요. 해결방법도 친절하게 알려주긴 하네요.

 

  ▶ safe.directory 를 추가하기  위해 git Bash 를 열고 아래 디렉토리로 이동합니다.

$ git status
fatal: unsafe repository ('D:/Project/Android/test_app' is owned by someone else)
To add an exception for this directory, call:

        git config --global --add safe.directory D:/Project/Android/test_app

 

에러 해결을 위한 방법도 알려주네요.

$ git config --global --add safe.directory D:/Project/Android/test_app
>> 로그없음.
$ git status
On branch advanced_coroutine_tutorial
nothing to commit, working tree clean

 

 

참고용 자료입니다.

수고하세요.

반응형