Git(깃) 설치하기

서문🌙·2023년 3월 3일
0
post-thumbnail

GIT 설치

  1. cmd 혹은 bash 터미널 접속
  2. git config --global init.defaultBranch main
  3. git config --global user.name "깃허브ID"
  4. git config --global user.email "깃허브이메일"

-> 내 컴퓨터에 설치한 git 프로그램과 github 계정을 연동하는 것
(설치 후 딱 한번만 하면 됨.)

  1. 나의 github의 settings/repositories에서
    Repositories default branch를 main으로 수정 후 Update
    - 원래 main 이라면 패스

  2. 깃허브에 새 Repositories 생성 (Add README file해제)

  3. .gitignore 파일 세팅
    .gitignore 파일

  4. 프로젝트에 깃허브 리포지터리 연결
    - IntelliJ 자바 프로젝트 생성
    - 터미널 접속
    - git init
    - git remote add origin "리포지터리 주소"

    (이후는 작업에 따라)
    - git add .
    - git commit -m "커밋 메세지"
    - git push origin main


profile
예외(exception)는 있다

0개의 댓글