💽 CICD/Git
[Git] git push --set-upstream origin main
heywantodo
2024. 2. 1. 11:08
728x90
반응형
[Git] git push --set-upstream origin main
git에서 push를 할 때, 다음과 같은 에러가 발생했다.
이유를 찾아보니 원격 저장소에 기본 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'.
해결방법은 다음과 같이 기본 브랜치를 설정해주거나,
git push --set-upstream origin main
원격 저장소를 명시한 후 push를 해주면 된다고 한다.
git push origin main
참고
728x90
반응형