GIT-DROVER(1)

NAME
git-drover - Apply a commit from the trunk to a release branch, or from one release branch to another.

SYNOPSIS

git drover

DESCRIPTION

git drover is NOT IMPLEMENTED yet. See the EXAMPLE section for the equivalent sequence of commands to run.

EXAMPLE

  PREREQUISITES

Before working with branches, you must gclient sync --with_branch_heads at least once to fetch the branches.

Merge Example

        # Make sure we have the most up-to-date branch sources.
        $ git fetch
        # Here's a commit (from some.committer) that we want to 'drover'.
        $ git log -n 1 --pretty=fuller
        commit 0421d3583f73220c8f88b1a96898fcd81222fe73
        Author:     some.committer <some.committer@chromium.org>
        AuthorDate: Thu Apr 10 08:54:46 2014 +0000
        Commit:     some.committer <some.committer@chromium.org>
        CommitDate: Thu Apr 10 08:54:46 2014 +0000
            This change needs to go to branch 9999
        # Checkout the branch we want to 'drover' to.
        $ git checkout -b drover_9999 branch-heads/9999
        Branch drover_9999 set up to track remote ref refs/branch-heads/9999.
        # Now do the 'drover'.
        # IMPORTANT!!! Do Not leave off the '-x' flag
        $ git cherry-pick -x 0421d3583f73220c8f88b1a96898fcd81222fe73
        [drover_9999 5c0a17d] This change needs to go to branch 9999
         Author: some.committer <some.committer@chromium.org>
         Date: Thu Apr 10 08:54:46 2014 +0000
         1 file changed, 1 insertion(+)
         create mode 100644 modified_file
        # That took the code authored by some.committer and committed it to
        # the branch by the person who drovered it (i.e. you).
        $ git log -n 1 --pretty=fuller
        commit 5c0a17dd382cd098182ac9f486ccd6b86c28d96e
        Author:     some.committer <some.committer@chromium.org>
        AuthorDate: Thu Apr 10 08:54:46 2014 +0000
        Commit:     you <you@chromium.org>
        CommitDate: Thu Apr 10 09:11:36 2014 +0000
            This change needs to go to branch 9999
            (cherry picked from commit 0421d3583f73220c8f88b1a96898fcd81222fe73)
        # Looks good. Ship it!
        $ git cl upload
        # Wait for LGTM or TBR it.
        $ git cl land
        # Or skip the LGTM/TBR and just 'git cl land --bypass-hooks'

Revert Example

        # Make sure we have the most up-to-date branch sources.
        $ git fetch
        # Checkout the branch with the change we want to revert.
        $ git checkout -b drover_9999 branch-heads/9999
        Branch drover_9999 set up to track remote ref refs/branch-heads/9999.
        # Here's the commit we want to revert.
        $ git log -n 1
        commit 28bb44fa7f9d5e19b73a670ae923d3a96dec250a
        Author: some.committer <some.committer@chromium.org>
        Date:   Thu Apr 10 08:54:46 2014 +0000
            This change is horribly broken.
        # Now do the revert.
        $ git revert 28bb44fa7f9d5e19b73a670ae923d3a96dec250a
        # That reverted the change and committed the revert.
        $ git log -n 1
        commit 4618467de1407aa159624015c8c8461ec35fbaf1
        Author: you <you@chromium.org>
        Date:   Thu Apr 10 09:11:36 2014 +0000
            Revert "This change is horribly broken."
            This reverts commit 28bb44fa7f9d5e19b73a670ae923d3a96dec250a.
        # As with old drover, reverts are generally OK to commit without LGTM.
        $ git cl upload -r some.committer@chromium.org --send-mail
        $ git cl land --bypass-hooks

SEE ALSO

git-cherry-pick(1), git-revert(1)

CHROMIUM DEPOT_TOOLS

Part of the chromium depot_tools(7) suite. These tools are meant to assist with the development of chromium and related projects. Download the tools from here[1].

NOTES

1.  here
    https://chromium.googlesource.com/chromium/tools/depot_tools.git