Repo is a tool for system management of multiple gittrees. repo is not a source code version management system. it is only integrated with multiple projects of projectlistxml in manifest. git for unified management. When reposync is run, all the specified projects in the xml file are unified...
Repo is a tool for system management of multiple git trees. repo is not a source code version management system, but is only associated with manifest. multiple projects in the project list xml in git are managed in a unified manner. When repo sync is run, all the specified projects in the xml file are synced.
The following uses the simplest example to demonstrate how to recommend a repo service.
1. go to the home directory and create the repo-server subdirectory, such as/home/lihacker/repo-server.
2. create a new manifest. git directory in the directory and initialize it as a git tree.
Run git init
3. add a default. xml file to the/home/lihacker/repo-server/manifest. git directory. the content is as follows:
[Html]
Git add default. xml and commit.
The remote row specifies the address of the repo server, and the default row specifies the default version and the remote server, which must be specified according to the actual situation. Here, the underlying git is the simplest file copy, which may be git, git + ssh or http.
The following two lines specify the project list, which has two projects, they are located in the/home/lihacker/repo-server/external/example1 and/home/lihacker/repo-server/external/example2 directories respectively, and after the customer repo sync, the external/example1 and external/example2 directories in the current directory will be located.
Therefore, the server needs to initialize the two git trees:/home/lihacker/repo-server/external/example1 and/home/lihacker/repo-server/external/example2.
[Plain]
Lihacker @ lihacker-laptop :~ /Repo-server/external/example1 $ pwd
/Home/lihacker/repo-server/external/example1
Lihacker @ lihacker-laptop :~ /Repo-server/external/example1 $ git init
4. client sync code
Create ~ /Repo-client directory, and run:
Repo init-u ~ /Repo-server/manifest. git/
Run repo sync later. you will find that ~ /Repo-client has external/example1 and external/example2 directories ~ /Repo-client has a hidden. repo directory. Www.2cto.com
Lihacker @ lihacker-laptop :~ /Repo-client $ ls-
... External. repo
[Plain]
Lihacker @ lihacker-laptop :~ /Repo-client $ tree
.
'-- External
| -- Example1
| '-- 1
'-- Example2
'-- 2
3 directories, 2 files
Author: Song Baohua