[Git]Git Bash 명령어

zzincode·2022년 12월 12일

Git GitHub

목록 보기
1/17
post-thumbnail

Command창 명령어

📌디렉토리 이동

$ cd .. (하위 디렉토리로 이동)

$ cd 이동할 하위 디렉토리 명


remote 저장소 연결

📌환경설정(컴퓨터마다 처음에만)

$ git config --global user.name "내이름"
$ git config --global user.email "내이메일"

📌github 저장소 연결

$ git remote add origin github 저장소 주소

📌github 저장소 변경

$ git remote set-url origin 변경할 github 저장소 주소

📌remote 저장소 초기화

$ git init

📌remote 저장소 주소확인

$ git remote -v


github commit하기

📌디렉토리 내에 모든 파일 업로드

$ git add .

📌디렉토리 내에 특정 파일 업로드

$ git add 파일명

📌Commit

$ git commit -m "커밋메시지"

📌업로드

$ git push origin main

📌협업 시 다른사람이 작업한 것 당겨오기

$ git pull origin main

+)(main) 브랜치 전환

$ git checkout -b "main"


git 저장소 복제

📌git clone

$ git clone github 저장소 주소

0개의 댓글