Configuration Management

repo 명령어 정리

알로그 2021. 2. 20. 18:53
반응형

repo

repo란 여러 git repository 전체에 걸친 작업을 단순화하여 git을 보완하기 위해 만든 툴이다.

보통 manifest.xml 파일에 각 git repository를 명시하여 한번에 원하는 작업을 실시할 수 있다.

 

 

Repo 명령어 정리

repo 초기화

$ repo init -u url [options]

현 디렉토리 기준으로 repo 생성 명령어이며,

.repo라는 디렉토리가 생성되며 폴더 내부에 매니페스트 파일에 대한 심볼릭 링크인 manifest.xml도 포함된다.

 

 

소스코드 동기화

$ repo sync [opsions]

보통 job thread를 여러 개 돌릴 수 있는 j옵션과 같이 쓴다.

 

 

소스코드 업로드

$ repo upload [project-list]

 

 

커밋, 작업트리 간 변경사항 확인

$ repo diff [project-list]

 

 

repo 프로젝트 내 브랜치 변경

$ repo start [branch] -all

 

 

repo 프로젝트 특정 날짜의 소스코드로 돌아가기

$ repo forall -c "git log -1 --pretty="%h" --until="2016-01-11" | xargs git reset --hard

 

 

repo hash 값 얻기

$ repo forall -c git log -1 --pretty=format:%h | md5sum

 

 

manifest 생성

$ repo manifest -o [name].xml -r

 

 

repo 명령어 참조 : https://source.android.com/setup/develop/repo

 

Repo 명령어 참조  |  Android Open Source Project

 

반응형