예를 들어 $HOME
이 /home/consy/
이고 $AOSP_ROOT
이 /home/consy/aosp/
인 경우를 예로 들어 보겠습니다. 당신이 repo sync
실행할 때
#init a local bare repo as the remote repo of `mydevice`
cd $AOSP_ROOT/device/
git init mydevice
git commit --allow-empty -m 'init repository'
cd $HOME
git clone $AOSP_ROOT/device --bare -- mydevice.git
cd $AOSP_ROOT/device
rm -rf mydevice
#create .repo/local_manifests (this is a feature of repo)
mkdir -p $AOSP_ROOT/.repo/local_manifests
#create a manifest under `local_manifests`.
#You can name it whatever you like except that the manifest's content should be like:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="file:///home/consy/" name="this"/>
<default remote="this" revision="master"/>
<project name="mydevice" path="device/mydevice"/>
</manifest>
은 이제 로컬 매니페스트에 정의 된 프로젝트 (들)
$AOSP_ROOT
등의 추가 프로젝트에 추가됩니다. 이러한 추가 프로젝트를 조작하려면
repo status
과 같은 repo 명령을 사용할 수 있습니다. 저장소는
/home/consy/mydevice.git
에서 복제되고
$AOSP_ROOT/device/mydevice
으로 체크 아웃됩니다.
$AOSP_ROOT/device/mydevice
아래에 새로운 커밋을 작성한 후에는
git push this <ref>:<ref>
을 실행하여 커밋을
/home/consy/mydevice.git
에 업로드 할 수 있습니다. 나중에이 새로운 저장소를 Github 또는 자신의 Gerrit와 같은 실제 호스트에 게시 할 준비가되었다고 생각하면 Github 또는 Gerrit에 새로운 원격 포인팅을 추가하고이를 밀어 넣을 수 있습니다. 그런 다음
repo init
때 사용할 메인 매니페스트에 프로젝트 정의
<project name="mydevice" path="device/mydevice"/>
을 추가하고 변경 사항을 커밋 한 다음 원격 매니페스트 리포지토리에 푸시합니다. 그런 다음 중복 프로젝트 오류를 피하기 위해
$AOSP_ROOT/.repo/local_manifests
에서 로컬 매니페스트를 제거 할 수 있습니다.
로컬 매니페스트 기능에 대해서는 Local Manifests
(https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.txt)을 참조하십시오.