From: Jim Meyering Date: Wed, 18 Feb 2009 13:50:04 +0000 (+0100) Subject: doc: explain how to recover from changes committed to master X-Git-Tag: v7.1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a3f944791cf93b6abbb544ee0b4df6f2b777351;p=thirdparty%2Fcoreutils.git doc: explain how to recover from changes committed to master * HACKING: A beginner's commit-to-master is so common, and causes enough confusion, that we describe how to recover. --- diff --git a/HACKING b/HACKING index f6d878f14c..bf9a45e04d 100644 --- a/HACKING +++ b/HACKING @@ -32,9 +32,14 @@ inside your new coreutils/ directory: If you have made *no* changes: git pull -If you *have* made changes and committed them to "master", do this: - git fetch - git rebase origin +If you *have* made changes and mistakenly committed them to "master", +do the following to put your changes on a private branch, "br", and +to restore master to its unmodified (relative-to-upstream) state: + git checkout -b br + git checkout master + git reset --hard origin + +Then "git pull" should work. *Before* you commit changes