본문 바로가기

LIFE

[git] 명령어

new repository

git bash here ->

git init

git add README.md

git commit -m "first commit"

git remote add origin ___주소___

git push -u origin master


git add . / git add filename.__

git commit -m "comment"

git push origin master

git push origin main

(master -> main 으로 default branch 이름이 바뀌었다고 한다 😳)


git add .

- ls 해서 나온 파일들 모두 add

git add file_name

- 파일 add

git commit -m "comment"

git status

- git 상태 보기