1. private repository를 github에서 생성
2. github > settings > SSH and GPG Keys > SSH keys 설정
등록되어있는 키 확인
ls -al ~/.ssh
키 복사
pbcopy < ~/.ssh/id_ed25519.pub
https://devocean.sk.com/blog/techBoardDetail.do?ID=163311
GitHub SSH 접속 설정하기
devocean.sk.com
3. Terminal 에서 git 명령어 실행
git init > git add . > git commit -m "commit" > git branch -M main > git remote add origin git@github.com:username/reponame.git (*github repo code ssh에서 복사) > git push -u origin main
https://2vup.com/git-first-commit/
Github에 처음 파일 올리기(Repository 생성 및 git push)
🤖 Github에 처음 가입했을 경우 처음 Github에 가입한 후 Repository를 만들면 비어있는 상태입니다. 이 Github 사이트 내 나의 Repository와 나의 컴퓨터, 즉 로컬을 이어주기 위해서는 아래와 같은 절차
2vup.com
*! [rejected] master -> master (non-fast-forward) 에러 발생하면
git init (다시 초기화) > git remote add origin git@github.com:username/reponame.git > git push origin +main
[Git] ! [rejected] master -> master (non-fast-forward) 해결 방법
ubuntu@server:~/PythonHome/TestTA/api$ git push --set-upstream origin master Username for 'https://github.com': SOMJANG-42MARU Password for 'https://SOMJANG-42MARU@github.com': To https://github.com/SOMJANG-42MARU/MaruKeyword.git ! [rejected] master -> mas
somjang.tistory.com
'Developement' 카테고리의 다른 글
[프로그래밍] 추상클래스와 인터페이스 (0) | 2023.06.29 |
---|---|
[디자인] 시각 디자인 규칙 (0) | 2023.03.07 |
[Linux] 크론탭 사용법(feat. nano editor) (0) | 2023.02.20 |