Getting Started with Git (6.repo)

Source: Internet
Author: User
Tags git commands

Repo is a code versioning tool that consists of a series of Python scripts that encapsulate a series of GIT commands for unified management of multiple Git repositories.

Because Android source code refers to a lot of open source projects, each sub-project is a git repository, each git repository has a lot of branch version, in order to facilitate the unified management of the various sub-projects of the Git repository, need a top tool batch processing, so repo was born.

Repo also builds a git repository that records which branch of the GIT repository for each sub-project under the current Android version, which is often called the manifest repository.

Repo Start <topic_name>

Starting a new theme is actually creating a new branch for each project.

Repo Init-u <url> [OPTIONS]

Initializing the repo in the current directory will generate a. Repo directory in the current directory, like. Git under Git project,-u specifies the URL, you can add parameter-m to specify the manifest file, and the default is default.xml,.repo/ Manifests save manifest file: Repo/projects has all of the project's data information, Repo is a collection of Git project, each git Directories such as refs in the. git directory under Project are linked to the. Repo/manifests.

Repo manifest

You can generate a manifest file based on the current version information for each project

Repo Sync [PROJECT1 ... PROJECTN]

Synchronize code.

Repo status

View all local project modifications, with two characters before each modified file, and the first character representing the state of the staging area.

Each two characters represents the state of the workspace

repo prune <topic>

Delete a branch that has been merge

Repo Abandon <topic>

Delete Branch, whether merged or not

Repo branch or repo branches

View all Branches

Repo diff

View Changes

Repo upload

Upload local commit to server

Repo ForAll [Project_list]-c COMMAND

Executes command commands on the specified project list or all project, plus the-p parameter to print out the path to project.

Repo forall-c ' git reset--hard head;git clean-df;git rebase--abort '

This command can undo the local modification of the entire project.


Getting Started with Git (6.repo)

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.