Git - 명령어 모음

옛슬·2021년 10월 11일
0

ETC

목록 보기
2/8
post-thumbnail

Overview

아직 익숙하지 않은 Git😅
사용한 명령어를 모아두고 필요할때마다 꺼내보는 용도로 작성

명령어 모음

  1. 프로젝트 시작 & Push
    git init - git을 시작할 때 (처음에만 작성)
    git remote add origin https://example.git - https// 부분에 Repository 주소 작성
    git add index.html - index.html 부분에 Git에 추가할 파일의 경로를 적는다.
    git commit -m '이곳에 커밋메시지를 적는다'- 커밋 메시지 작성
    git push origin master - 파일을 전송할 때 사용

  2. 가장 최근 commit을 삭제하고 싶을 때
    git reset HEAD^
    git push origin master -f

Documentation

https://git-scm.com/docs

profile
웹 퍼블리셔입니다💓

0개의 댓글