반응형
로컬 저장소 만들기
01 git init
git init명령을 현재 디렉토리에 새로운 Git 저장소가 생성된다. 그리고 기본설정(이름,이메일 주소 등과 브랜치)이 초기화된다. 그래서 보통 새로운 프로젝트를 시작하거나 기존 프로젝트를 Git으로 관리하기 시작할때 사용된다.
$ git init
원격 저장소 추가
01 원격 저장소 주소 확인하는 법
가져오고 싶은 Git Repository로 들어가서 Code를 누른다음 아래와 같이 HTTPS부분에서 주소를 확인할 수 있다.

02 원격 저장소 추가
그리고 아래와 같이 입력하면 된다. 그러면 새롭게 저장소가 추가된다.
$ git remote add origin code-piggy/example.git
git remote와 관련된 명령어들
01 git remote -v
현재 연결된 원격 저장소(remote repository)를 보여준다.
$ git remote -v
02 git remote remove
원격 저장소의 연결을 제거한다.
$ git remote remove <원격 저장소 이름>
03 git remote rename
원격 저장소 이름 변경한다.
$ git remote rename beforename aftername
04 git remote show
원격 저장소 구체적인 정보를 확인할 수 있다.
$ git remote show origin
* remote origin
Fetch URL: https://github.com/schacon/ticgit
Push URL: https://github.com/schacon/ticgit
HEAD branch: master
Remote branches:
master tracked
dev-branch tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
폴더 및 경로 이동해보기
01 mkdir
새로운 폴더 생성한다.
mkdir foldername // "foldername"인 폴더 생성
만약 한번 더 사용하게되면 foldername안에 하위폴더가 생성된다.
02 cd
Change Directory약자로 디렉토리를 변경한다.
cd foldername // 현재 디렉토리에서 foldername으로 이동한다.
cd .. // 현재 디렉토리의 상위 디렉토리로 이동
cd ~ // 홈 디렉토리로 이동
반응형
'유니티 공부 > GitHub' 카테고리의 다른 글
GitHub - 최근 커밋 수정하기 (amend 사용) (0) | 2024.04.04 |
---|---|
GitHub - The file will have its original line endings in your working directory (0) | 2024.03.18 |
GitHub - LFS(Large File Storage)사용법-100MB이상의 파일을 업로드 하기 (1) | 2024.03.18 |
GitHub - 브랜치(branch) 이용해서 fetch,pull,add, commit, push 해보기 +) branch관련 명령어들 (0) | 2024.03.15 |
댓글