728x90
**상황 : 소스를 저장소에 연결하려는 에러가 난다.
emily-MacBook-Pro:xhtml-viewer a1$ git remote add origin https://github.com/~~~~.git
error: remote origin already exists.
**해결 : 현재 origin에 설정된 URL을 올바른 URL로 변경하려면 아래 명령어를 실행.
emily-MacBook-Pro:xhtml-viewer a1$ git remote set-url origin https://github.com/~~~.git
***연결 확인
emily-MacBook-Pro:xhtml-viewer a1$ git remote -v
origin https://github.com/~~~~.git (fetch)
origin https://github.com/~~~~.git (push)
***main 브랜치를 푸시.
git push -u origin main
--> 처음 push 할때는 아래와 같이 해줘야.
emily-MacBook-Pro:xhtml-viewer a1$ git push
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin main
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
728x90
'IT기타' 카테고리의 다른 글
구글 스프레드시트에서 다른 스프레드시트의 시트 이름을 가져오려면 (0) | 2025.04.02 |
---|---|
맥북-한/영 전환키 단축키 설정, 내장앱으로 오른쪽 단축키로 설정. (setting only Right command key mac) (0) | 2025.03.30 |
정규식- "?" "+" 의 의미 (0) | 2025.03.29 |
엑셀-다른시트(또는 다른 표)에서 값 가져오기 (0) | 2025.03.25 |
엑셀-MATCH, INDEX, IFERROR 활용 예제 (0) | 2025.03.24 |