250x250
Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
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
관리 메뉴

devlog_owen

git pull과 git clone의 차이/ git 명령어 정리 본문

TIL

git pull과 git clone의 차이/ git 명령어 정리

developer_owen 2024. 7. 12. 16:08
728x90

git clone

- git init, remote 연동까지 자동으로 됨

-처음에 한번만 하면 됨

 

git pull

- git clone 한다음 당겨올때

 

git 실습

-git init

-git config --global user.name <이름>

 

-git config global user.email <이메일>

 

 

- git config --global -l

=>user.name=송창현
user.email=alslvls1995@naver.com

 

- git status

파일이 어떤 area에 있는지 확인

 

$ echo hello world > a.txt

파일 내용까지 디테일한 설정가능

$ touch b.txt c.txt

b,c 텍스트 파일 생성

 

git restore a.txt

modified 파일을 수정전 상태로 되돌림

 

git log

커밋 내역 확인

 

$ git log --oneline

=>5e00499 (HEAD -> master) add: first

특정 커밋으로 돌아가기 위함

 

$ git commit --amend

커밋메시지 수정

 

$ git remote -v

연결된 원격저장소 확인

 

$ git push origin +master

연결된 저장소 권한 뺏기

728x90