**Episode 22:** by Edward Lesmes in San Francisco, CA (June, 2021)  

[Previous episodes](https://developer.chrome.com/docs/chromium/chronicle)

Depot Tools is a collection of tools built on top of Git to simplify the
workflow of developers contributing to the Chromium codebase and related
projects. It contains tools to **get the code, upload changes for review,
keep your checkout up to date**, and more!

## Get the code

Run `fetch chromium` in an empty directory. The `fetch` command can also be
used to get the code for other repositories like v8, or webrtc. See
`fetch help` for a full list.

## Upload a change for review

Each CL corresponds to a single branch in git, so start by running
`git new-branch <branch_name>` to create a new branch. Commit as many
changes as you like to this branch and run `git cl upload` when it's ready
for review.

`git cl issue` will let you know what CL your branch is associated with.
Use `git cl issue <issue>` to change it.

## Keep your checkout up to date

Run `git rebase-update` periodically to sync local branches to their
upstream, and `gclient sync` to update `third_party` repos and run
pre-compile hooks.

## Manage multiple CLs

- `git cl status` will show CLs associated with local branches and their status (unsent, lgtm, closed, etc).
- `git freeze` and `git thaw` work like `git stash`, but keep track of the branch associated with the stashed changes.
- `git map` will show you the history of all of your branches, and `git map-branches` will show you the upstream relationships between all your branches.
- `git new-branch --upstream_current <branch_name>` creates a new branch on top of an existing branch. Use `git rebase-update` to rebase a dependent branch after making changes to the base branch.

## Keep working on an existing CL on a different machine

Run `git cl patch <issue_url>` to cherry-pick an existing CL on top of the
current branch. Note that it will associate the current branch with the
patched CL. Use `git cl patch <issue_url> --reapply` to discard local
changes and reapply the issue.

## And more

Check out the [depot tools tutorial](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) and explore the help
messages for each command to discover all the cool features, and let us
know at if you have any [issues](https://issues.chromium.org/issues/new?noWizard=true&template=1922777&component=1456102)!