❗ Error
- git push 를 하려니 fetal error in commit_refs라는 error 발생
- git 내용과 local pc 내요에 차이가 발생해서 그런 것 같음
📑 Error MSG
remote: fatal error in commit_refs
To https://github.com/pr.git
! [remote rejected] (failure)
error: failed to push some refs to 'https://github.com/pnt.git'
✨ 해결 방법
💡 Soultion 1: 원격 저장소 정보 업데이트
- brach 들의 정보를 업데이트 해본다
git remote update
- 연결 상태 파악하기 (주소가 뜨면 잘 되고 있는 것)
origin https://github.com/pr.git (fetch)
origin https://github.com/pr.git (push)
💡 Soultion 2: 원격 저장소 제거 후 재연결
git remote remove <원격저장소를 가져온 이름 ex origin>
git remote add origin <가지고 올 원격 저장소>
git remote -v
<원격저장 소 주소>
git brach "생성하고 싶은 주소"
git checkout "생성하고 싶은 곳으로 이동"
git add .
git commit -m "commit msg"
git push origin "brach 명"