[Git] Git 실습

Kangsick·2022년 2월 12일

Git

목록 보기
3/4
  1. Linux 세션 때 만든 wecode 폴더로 이동
    cd Desktop/wecode
  2. wecode 폴더 안에 git_practice 폴더 생성
    mkdir git_practice
  3. Git 시작 :
  • git 초기화
# git_practice으로 이동
cd git_practice

# git 초기화
git init
  • .git 폴더 확인
    ls-al
  1. 본인영문이름.md 파일 생성
    touch kanghoyoo.md
  2. 해당 파일에서 본인 이름 작성 후 저장
  • vim 편집기 실행
    vi kanghoyoo.md
    insert 모드 전환 후 내용 작성 및 저장
  • git 상태 확인
    git status
  1. Staging(중간 저장)
    git add
  • git status로 상태 변화 확인
  1. Commit
    git commit -m "메세지
  • git status로 상태 변화 확인
  1. Commit history 확인
    git log
  2. Github repo 생성
    github 사이트 → New repository
  3. git_practice 폴더와 github repository 연동
    git remote add origin repository주소
  4. git push
    git push origin main
profile
성장하는 프론트엔드 개발자의 길

0개의 댓글