그전에 내가 이것을 하려고 했던 이유는 다음과 같다.
나와 같은 상황이라면 밑에 방법을 해보는 것을 추천한다.
우분투 터미널에서 계속해서
이렇게 나오면 밑에 있는 것을 해보면해결 될것이라 본다!
git init 명령어를 사용하여 빈 깃을 초기화 시켜줍니다.
로컬 과 사이트 연결을 위해서 sudo git remote add origin 연결하고자주소
여기서 다음줄에 비밀번호가 나오면 로그인 비밀번호를 입력하면 다음칸으로 넘어간다.
git remote -v 입력한다(이것을 하는 이유는 remote에origin이 잘 연결되었나 확인하는 것이다.)
추가해놓았던 파일을 git add . 명령어를 확인해보고 git status 하고 난뒤 git commit -m "메세지입력"
git push origin master (입력하고나면)
Username for 'https://github.com': 본인 아이디
Password for 'https://github.com': 비밀번호
그다음
*[new branch] master -> master 로 나오면 정상적으로 연결하고자하는 레포지토리에 저장이 된다.!!!
=======================================
(base) chp@chp-chp6000:~/team$ pwd
/home/chp/team
(base) chp@chp-chp6000:~/team$ git init
/home/chp/team/.git/ 안의 빈 깃 저장소를 다시 초기화했습니다
=========================================================
(base) chp@chp-chp6000:~/team$ sudo git remote add origin https://github.com/chp9419/teamre.git
[sudo] chp의 암호:
(base) chp@chp-chp6000:~/team$ git remote -v
origin https://github.com/----/teamre.git (fetch)
origin https://github.com/----/teamre.git (push)
커밋할 변경 사항:
(스테이지 해제하려면 "git rm --cached <파일>..."을 사용하십시오)
새 파일: pr
:~/team$ git commit -m "본인이 입력하고자 하는 이름"
=================================================================
[master (최상위-커밋) 46f9cfb] new file_0.01
1 file changed, 1 insertion(+)
create mode 100644 pr
==================================================================
(base) chp@chp-chp6000:~/team$ git push origin master
Username for 'https://github.com':
Password for 'https://github.com':
==================================================================
(base) chp@chp-chp6000:~/team$ git push origin master
==============================================================
Username for 'https://github.com':
Password for 'https://본인아이디나옴@github.com':
오브젝트 나열하는 중: 3, 완료.
오브젝트 개수 세는 중: 100% (3/3), 완료.
오브젝트 쓰는 중: 100% (3/3), 208 바이트 | 208.00 KiB/s, 완료.
[new branch] master -> master ( 이렇게 나오면 사이트에 잘 연결된다는 뜻이다)