git clone 명령어를 이용해서 Repository로 부터 local로 다운 받는 방법이다.

Repository에 test.git

git clone [RepositoryURL.git]

Repository test.git을 local로 받을때 local 폴더명 변경하기

git clone [RepositoryURL.git] [변경폴더명]

하위 폴더 Clone

git clone [RepositoryURL.git] .

저장소 변경

git remote set-url origin [변경저장소]

저장소 확인

git remote -v

모든 커밋 기록 제거(Clone 디렉토리 이동)

rm -rf .git // 삭제
git init // 초기화
git remote add origin [저장소]
git add . // status 추가
git commit -m 'commit msg'

// git 브랜치가 master이 아닐 경우 체크아웃 마스터로 진행
git checkout master

//최소 remote master로 push할 경우
git push --set-upstream origin master