์ค๋๋ง์ ๊ฐ์ธ ํ๋ก์ ํธ๋ฅผ ์์ํ๋๋ฐ ์ฌ๋ ํ ์ด ๊ธธ๋ค๋ณด๋ ๋งค๋ฒ ์์ํ ๋๋ง๋ค git ๊ด๋ จ ์ค๋ฅ๋๋ฌธ์ ๊ตฌ๊ธ๋งํ๋ ์๊ฐ์ด ์๊น์ ๊ธฐ๋ก์ฉ์ผ๋ก ๋จ๊น๋๋ค.
์์ค ์ฝ๋ ์์ฑํ๊ณ ์ด๋ฐ์ ๋ฐ ํ ์คํธ ํด๋ณด๊ณ github repo ์์ฑํ์ push ํ๋ ค๊ณ ํ๋๋ฐ
% git init
% git remote add origin {github url}
% git push --set-upstream origin main
Password for 'https://aaaaaa@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aaaaaa/test.git/'
์ด๋ ๊ฒ ์๋ฌ๊ฐ ๋๋ค๋ฉด Password ๋์ Personal Access Token(PAT) ๊ฐ์ ๋ฃ์ด์ฃผ๋ฉด ๋จ.
PAT ๋ github๊ณ์ ์ค์ (repo ์ค์ ์๋) > Developer Settings > Personal access tokens (classic) ์์ ๋ฐ๊ธ๋ฐ์ ์ ์์.
๊ทธ๋ฆฌ๊ณ ๋ธ๋์น ์ด์๋ก ์๋์ ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค๋ฉด..
% git checkout main
branch 'main' set up to track 'origin/main'.
Switched to a new branch 'main'
% git merge prod
fatal: refusing to merge unrelated histories
% git merge prod --allow-unrelated-histories
์ด ๋ช ๋ น์ด๋ก ํด๊ฒฐํ ์ ์์
'๐ป Programming' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
brew update ์ค๋ฅ (couldn't find remote ref) (0) | 2024.07.03 |
---|---|
Spock Test Framework ์คํ ์ค๋ฅ ํด๊ฒฐ (2) | 2024.01.03 |
[IntelliJ] ์ ๊ท ์์ฑ ํ๋ก์ ํธ์ ๋น๋ ์ค๋ฅ (Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1) (1) | 2024.01.03 |
SpringBoot 2.3 -> 2.5 ์ ๊ทธ๋ ์ด๋ ํ๊ธฐ (0) | 2023.12.29 |
[AWS/SQS] cloudwatch datapoint ์กฐํํ๊ธฐ (2) | 2022.12.29 |