6/15 Git Repository

Yoochang Sung·2024년 6월 16일

Git

목록 보기
4/13

Git Repository

  • Git 저장소 라고도 불림. git으로 관리하는 프로젝트 저장소
  • 파일과 디렉토리가 포함될 수 있고, 버전관리를 시작할 수 있다.

저장소

  • Local Repository : 사용자 컴퓨터의 저장소
  • Remote Repository : 원격 서버의 저장소

저장소 생성

Git init - 아직 버전관리를 하지 않는 프로젝트 폴더를 Git 저장소로 만들 수 있다.
Git clone - Remote 저장소를 로컬에 복사하여 사용할 수 있다.

Git init

git init 이 명령어 끝

반드시 폴더 안으로 들어가서 git init을 실행시켜야 한다!

이러면 git repository가 됨.

Remote Repository URL

레포시토리 주소에 규칙이 있다. (github)

개인 : http://github.com/<user_name>/<project_name>.git

조직 : http://github.com/<organization_>/<project_name>.git

문법 : git clone <URL_> git clone http://github.com/<user_name>/<project_name>.git

Git Clone with Token

Git clone 시 권한 확인을 반복하지 않기 위함.

git clone http://<토큰>@github.com/<user_name>/<project_name>.git

git bash에서 cd .. 하면 상위폴더로 이동!

실습

local

remote

토큰 값 다시 볼 수 없다!! 저장해놓기!!! 매우 중요!!!

profile
Yoochang Sung

0개의 댓글