Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Studyyyyy

VSC git 최초 설정하기 본문

깃, 깃랩, 깃허브

VSC git 최초 설정하기

manyYun 2022. 4. 18. 02:55

처음 해본거라 들쑥날쑥하다. 나중에 하나씩 정리하기..

 

git init

git clone https://~~~~~~.git

git config —global user.name “my name”

git config —global user.emailemail.naver.com

 

git add .

git commit -m “아무거나 커밋할 내용”

 

git push origin master //여기서 자꾸

fatal: 'origin' does not appear to be a git repository

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

라며 오류가 났는데

 

git remote -v 를 통해 원격저장소를 확인해줌

sw2-testttt https://~~~~~~.git (fetch)

sw2-testttt https://~~~~~~.git (push)

이런 식으로 나오는데, 앞의 sw2-testttt가 저장소? 이름임

이 이름을 확인한 후

 

git remote remove 이름(여기선 sw2-testttt)

를 사용하여 기존 원격 저장소의 연결을 해지해준다.

 

다시

git remote add origin 깃주소(https://~~~~~~.git)

git remote -v로 재확인 후 푸쉬해주니 정상적으로 푸쉬가 되고,

깃랩에서도 업로드한 파일들이 보인다!

중간에 어쩌다 git graph에서 repository가 없다는 오류도 사라졌다. 왜그런지는 모름..

 

마구잡이로 막히는 부분이 있으면 구글링해서 해본거라 아직 정확한 기능 순서를 모르겠다.

브랜치 나누는 법은 스터디 하면서 익히는걸로..

이번엔 깃랩으로 연결했는데, 나중엔 깃허브에도 연결해봐야겠다.

 

 

*도움받은 출처 : https://jjunii486.tistory.com/153