aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/dev/contrib/revert.md
blob: 75c4fcc89f9b64ecebd2c5cf3d6af39ddea52ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
How to revert a CL
==================

Using one-click revert
----------------------
*   Find the codereview issue for the CL you want to revert.
*   Click the "revert" button.

Using Git
---------

Update the local repository

    git fetch origin master

Create a local branch with origin/master as its start point.

    git checkout -b revert$RANDOM origin/master

Find the SHA1 of the commit you want to revert

    git log origin/master

Create a revert commit.

    git revert <SHA1>

Upload it to Gerrit.

    git cl upload

Land the revert in origin/master.

    git cl land

Delete the local revert branch.

    git checkout --detach && git branch -D @{-1}