Git add, commit, push 하는 법

scheuun·2023년 9월 6일


프로젝트 폴더안에 올리고 싶은 파일을 넣고 Open Git Bash here를 선택한다.

remote

$ git remote add origin [깃헙 repository주소]

git remote로 원격저장소를 추가한다.

status

git status

staging area에 등록된 파일의 상태를 확인한다.

add

git add .

git add 명령어로 파일을 staging area에 추가한다.
add 뒤에 .는 현재 디렉토리의 전체 파일을 추가한다.

commit

git commit -m "commit message"

git commit -m뒤에 따옴표안에 commit 메시지를 작성한다.

  • commit 성공시

push

git push

commit 한 파일을 git에 push 한다.

  • push 성공시
profile
java 개발자

0개의 댓글