깃 ide vs cli 푸시 비교

typkdev·2024년 8월 18일

깃 브랜치 마스터 메인 리모트, IDE 푸시와 CLI 푸시

  1. ide로 자동 토큰 로그인 > 디폴트 마스터 브랜치
  2. cli로 수동 커밋 > 브랜치가 다르다 오류 > git branch -m main 으로 통합 --help를 통한 공식문서 습득 이후

PS C:\Users\pkc\IdeaProjects\tb> git push
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use

git push origin HEAD:master

To push to the branch of the same name on the remote, use

git push origin HEAD

To choose either option permanently, see push.default in 'git help config'.
PS C:\Users\pkc\IdeaProjects\tb>

헤드 시점이 업스트림 지점 별 차이 발생

git push -u origin HEAD를 이용해 헤드 시점의 이름(main)과 업스트림 목적지의 이름(origin/main)을 똑같이 맞출 것.

profile
지엽적 연구를, 끊임 없는 의문을

0개의 댓글