Changelog Changes of git-repo. 0.7.8 (2021-11-19) Improvements: arm64: native Apple Silicon (M1) support to Mac builds sshinfo: check response of ssh_info for bad hostname ci: remove azure-pipeline, use github-action instead Setup githb action test: turn off git advice and warnings After load manifests, check and fixup missing attrs sync: check published ref if has –check-published option sync: clean obsolete mirror repositories sync: remove obsolete gitdir if obsolete project deleted init:...| Home on git-repo: a git wrapper from Alibaba
Quick Start Install git-repo You can download git-repo from: https://github.com/alibaba/git-repo-go/releases. Choose the proper package according to your OS (Linux, Mac, or Windows), and architecture (amd or 386), download and extract the package. Copy the binary into executable PATH (e.g. /usr/local/bin on Linux or macOS) to complete the installation. Run git-repo for the first time Run any subcommand of git-repo, will perform some initialization tasks. e.g.: $ git repo version Working on a ...| Home on git-repo: a git wrapper from Alibaba
Dependence Install git 2.10.0 or above before install/running git-repo. Download and Install git-repo Download the latest release of git-repo from: https://github.com/alibaba/git-repo-go/releases. Choose the proper package according to your OS (Linux, Mac, or Windows) and architecture (amd or 386), download and extract the package. Make git-repo executable before install on Linux or macOS: $ chmod a+x git-repo Move git-repo into an executable PATH (e.| Home on git-repo: a git wrapper from Alibaba
Execute git-repo for the first time git-repo will perform some initialization tasks on the first execution. See: git config extensions. Running any command will trigger the initialization tasks. $ git repo --version Note: git-repo will be recognized as git subcommand so that we can execute git repo (without a dash). Manual for git-repo Show help message of git-repo: $ git repo -h or $ git repo Show help message of of subcommands of git-repo, see the following examples:| Home on git-repo: a git wrapper from Alibaba
Upgrade git-repo Upgrade git-repo to the latest version, using command: $ git repo upgrade Will download and install the latest version of git-repo. If the upgrade process failed because of permissions or other reasons, it would show instruction in the output message. Please follow the instruction for manual upgrade. $ git repo upgrade Download git-repo: ############################################################ 100% +-------------------------------------------------------------------------...| Home on git-repo: a git wrapper from Alibaba
git-repo provides several alias commands for git workflow on a single repository: git peer-review or git pr: publish local commits to create code review. git download: download specific code review from remote to the local repository. git abandon: prune already published local branch. Demo for git workflow on a single repository: Fig: git-repo for a single repository| Home on git-repo: a git wrapper from Alibaba
git-repo provides alias command git peer-review or git pr to create a code review on a single repository. 1. Create a code review 1.1 Clone Clone remote repository to the local workspace (Ignore this step, if have local repository already): $ git clone https://codeup.aliyun.com/git-repo/demo.git $ cd demo 1.2 Create a local topic branch This step is optional. If you want to work on several different tasks at the same local workspace, you must create a topic branch for each task.| Home on git-repo: a git wrapper from Alibaba
Description Download commits of the specific code review, and check out the tip commit by default. git download is an alias command of git-repo. Usage git download [options] <Merge-Request-ID> git download [options] <Change-ID>/<Patch-ID> Note: For AGit-Flow and other compatible services, use <Merge-Request-ID> as a argument. For Gerrit service, use <Change-ID>/<Patch-ID> format argument. Options Available options: -c, --cherry-pick: Run cherry-pick after fetching. -f, --ff-only: Run merge --...| Home on git-repo: a git wrapper from Alibaba
Description Remove already published local branches. If option --force is given, will delete branch by force, just like git branch -D <branch-name>. git abandon is an alias command of git-repo. Usage git abandon [options] Options Available options: --all: Abandon all branches. -b, --branch: Abandon specific branch. --force: Delete by force, even local branch is not published yet.| Home on git-repo: a git wrapper from Alibaba
Git built-in solution for multiple repositories is git submodule. It is OK for the release of the source code of all related repositories, but it is bad for development because all sub repositories pin to specific commits. Android project introduced a better solution for the management of multiple repositories that the relationship of repositories is defined in an XML file in a manifest project. Android also introduced a new command-line tool named repo, which helps manage repositories.| Home on git-repo: a git wrapper from Alibaba
Manifest file example In a manifest repository, there are one or more XML files, which define the relationship of all repositories of the project. The default manifest file in the manifest project is default.xml. See the following content of a manifest file as an example: <?xml version="1.0" encoding="UTF-8"?> <manifest> <remote name="origin" fetch=".." revision="master" review="https://codeup.aliyun.com" /> <remote name="github" fetch="https://github.com" revision="master" review="" /> <defa...| Home on git-repo: a git wrapper from Alibaba
Description Initialize the current workspace or re-initialize workspace with different options. Will create .repo directory inside workspace while executing git repo init. There are one manifest repository and manifest file .repo/manifest.xml inside. Some options of git repo init will save as git configs in the .repo/manifests.git repository, such as -m <name>, -g <groups> options. Usage git repo init -u <URL> [options...] Options Available options: -u <URL>: URL of manifest project.| Home on git-repo: a git wrapper from Alibaba
Description Run git fetch and git checkout to downloads new changes and updates the working files in your local workspace. If you run repo sync without arguments, it synchronizes the files for all projects. When you run repo sync, this is what happens: Update manifest project. Compare with the project list file (if exist) generated by last git repo sync command, and remove obsolete projects (if nothing changed).| Home on git-repo: a git wrapper from Alibaba
Description Begin a new branch for development, starting from the revision specified in the manifest. Usage Create a new branch for specific projects. git repo start <branch-name> [project...] Create a new branch for all projects. git repo start --all <branch-name>| Home on git-repo: a git wrapper from Alibaba
Description Send changes to remote server to create code reviews. For the specified projects, compares the local branches to the remote branches updated during the last git repo sync. git-repo prompts you to select one or more of the branches that haven’t been uploaded for review. git repo upload command will start an editor for you with the following text as an example. Add custom options and choose the branches that need to be uploaded in the editor.| Home on git-repo: a git wrapper from Alibaba
Description Download commits of the specific code review, and check out the tip commit by default. Usage git repo download [options] <project> <Merge-Request-ID> ... git repo download [options] <project> <Change-ID>/<Patch-ID> ... Note: For AGit-Flow and other compatible services, use <Merge-Request-ID> as a argument. For Gerrit service, use <Change-ID>/<Patch-ID> format argument. Options Available options: -c, --cherry-pick: Run cherry-pick after fetching. -f, --ff-only: Run merge --ff-only ...| Home on git-repo: a git wrapper from Alibaba
Description This command provides an iterator, run a specific shell command on each project. The following environments can be used in a shell command: REPO_PROJECT: Name of project. REPO_PATH: Relative path to the project. REPO_REMOTE: Name of the remote in the manifest. Usage git repo forall [project-list] -c command Options Available options: -c: Command and arguments for each project to run. -e: If fail once, quit immediately.| Home on git-repo: a git wrapper from Alibaba
Description Show a summary of git status on each project. For each file in the project, a two-letter code is used. The first letter stands for changes of index, and the second letter stands for changes of worktree. In the first column, an uppercase letter indicates how the index differs from the last committed state. Letter Meaning Description - No change Same in HEAD and index A Added Not in HEAD, in index M Modified In HEAD, modified in index D Deleted In HEAD, not in index R Renamed Not in...| Home on git-repo: a git wrapper from Alibaba
Description Remove already published local branches. If option --force is given, will delete branch by force, just like git branch -D <branch-name>. Usage git-repo abandon [options] [<project>...] Options Available options: --all: Abandon all branches. -b, --branch: Abandon the specific branch. --force: Delete by force, even local branch is not published yet.| Home on git-repo: a git wrapper from Alibaba
About myself| git-repo: a git wrapper from Alibaba