• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

git-repo-go: git-repo 是阿里巴巴开源的一款命令行工具,对原生 Git 命令做了封装, ...

原作者: [db:作者] 来自: Gitee 收藏 邀请

Build Status

git-repo

repo reimplemented in Golang and many others

git-repo is repo reimplemented in Golang and with many other features.Using git-repo, a developer can create code reviews (pull requests) fromclient side directly. There will be no fork, no feature branches, and nowrite permission needed.

git-repo is a command line tool, which adds more sub-commands to git,and works for centralized git workflow like Gerrit, agit-flow of Alibaba.com,and other agit-flow alike protocols...

Installation

Download or compile the binary of git-repo from this repository, and install(copy) the executable of git-repo to proper location, such as /usr/bin ofLinux and MacOS, and C:\Windows\system32 of Windows.

After installation, execute the following command to validate the installation:

git repo version

Git aliases installed from git-repo

git-repo installs some useful git configurations for user, some unique aliascommands are:

git peer-review => git repo upload --singlegit pr => git repo upload --singlegit download => git repo download --single

Single repository mode

Create code-review directly from client side

  1. Clone a repository

     git clone https://codeup.teambition.com/gotgit/demo.git
  2. Create a local branch (optional)

     git checkout -b some/topic origin/master
  3. Create commits in worktree...

  4. Create code-review from command line:

     git pr

There are many options for git pr (or git peer-review, or git review), pleasecheck the manual:

    git repo upload --help

Download code-review to local repository for review

A new code-review (pull request) will be created or a old code-review will berefreshed after running git pr. Each code-review has a unique number, suchas pull request #123.

Reviewer can download it using command

git download 123

, and make a code review in local worktree.

Update code-review

Repeated command by author will update the code review:

git pr

If a reviewer wants to update a code-review, he or she can run:

git pr --change 123

(suppose 123 is the code review ID, the reviewer just downloaded)

Multiple repositories

git-repo supports android style multiple repositories management.

  • Init workspace from a manifest project.

      git repo init <manifest-url>
  • Clone / update all repositories referenced in the manifest repository.

      git repo sync
  • Create a local working branch instead of detached HEAD on all repositories.

      git repo start --all some/topic
  • Send changes to remote server to create code reviews.

      git repo upload

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap