평소와 같이 코드에 수정내용 git add . 와 git commit을 시도했는데 다음과 같은 에러가 발생했다.
fatal: cannot lock ref 'HEAD': unable to resolve reference 'refs/heads/main': reference broken
암튼 HEAD broken이라길래 머리에 문제가 생긴 것 같았다.;; git log 찍어보니
fatal: your current branch appears to be broken 해당 에러도 발생
검색을 통해 여러 방법을 시도해봤는데 해결되지 않았다..
https://burning-camp.tistory.com/20
https://www.reddit.com/r/git/comments/lgovpv/how_to_deal_with_a_broken_head/
https://itecnote.com/tecnote/r-broken-branch-in-git-fatal-your-current-branch-appears-to-be-broken/
pull 이랑 push를 진행하면서 예전에 기존에 있던 파일을 삭제하고 똑같은 내용에 파일을 붙여넣었었는데
그게 문제가 된 것 같았다. 결국 해결 방법으로 레포지토리를 갈아 엎는 방법이 좋다는 결론이 나와
레포지토리 삭제 후 새로 만들어 진행하였다..
'트러블슈팅' 카테고리의 다른 글
formdata 서버에서 multer사용해서 받기 (0) | 2023.07.26 |
---|---|
서버에서 쿠키받기 cookie-parser (0) | 2023.07.25 |
NextRouter was not mounted. (1) | 2023.07.10 |
CSS Scroll-snap 사용 (0) | 2023.02.16 |
이미지 리사이징 (0) | 2023.02.09 |