Create the simplest repo server instance

Source: Internet
Author: User
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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.