From 2445216b7aa726d01918eaccd72c0650585d0314 Mon Sep 17 00:00:00 2001 From: halcanary Date: Mon, 26 Jan 2015 12:38:59 -0800 Subject: [PATCH] site/dev/contrib/revert formatting and details NOTRY=true Review URL: https://codereview.chromium.org/873483004 --- site/dev/contrib/revert.md | 41 ++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/site/dev/contrib/revert.md b/site/dev/contrib/revert.md index 9067e50cd8..55a3beb7ed 100644 --- a/site/dev/contrib/revert.md +++ b/site/dev/contrib/revert.md @@ -3,16 +3,37 @@ How to revert a CL Using one-click revert ---------------------- - * Find the codereview issue for the CL you want to revert. - * Click the "revert" button. +* Find the codereview issue for the CL you want to revert. +* Click the "revert" button. Using Git --------- - * git checkout master - * git pull --rebase && gclient sync - * git checkout -b origin/master - * git log - * - * git revert - * git cl upload - * git cl land + +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 + +Upload it to rietveld. + + git cl upload + +Land the revert in origin/master. + + git cl land + +Delete the local revert branch. + + git checkout --detach && git branch -D @{-1} +