Git

1. Git : Git 사용법 (github, git, vs code)

제주도 조랑말 2023. 4. 16. 20:07
728x90

1. github.com 페이지에서 계정 생성

new file에서 file 명 생성

 

2. git-scm.com에서 git 다운로드

(1) git config -- global user.name "생성할 이름"

(2) git config -- global user.email "github페이지 이메일"

(3) git config --list , user.name과 user.email 값이 들어갔는지 확인 코

 

 

3. vs code 연결

(1) git init (처음하는 초기 설정)

(2) git add . (모든 파일 추가, 특정 파일만 하고 싶으면 ex) git add. index.html)

fatal: detected dubious ownership in repository at 오류 발생 시 

git config --global --add safe.directory '*' 입력하면 됨

(3) git status (file이 잘 들어갔는지 확인

(4) git commit -m "first commit" 

(5) git remote add origin "new file 생성시나오는 'git remote add origin ~~'  "

(6) git remote -v

origin  https://github.com/YoonGyu-sun/crud-project.git (fetch)
origin  https://github.com/YoonGyu-sun/crud-project.git (push)

이런식으로 뜨면 완료

 

(7) git push origin master

new branch master ->master 뜨고 github페이지 F5누르면 등록 완성

 

수정페이지 추가
(1) git add . 

(2) git status (확인)

(3) git commit -m "middle-project"

($) git push origin master

728x90

'Git' 카테고리의 다른 글

Git : git remote:permission to.. denied to error: 403 에러 해결  (0) 2023.07.17
Git 관련  (0) 2023.06.07