]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: explain how to recover from changes committed to master
authorJim Meyering <meyering@redhat.com>
Wed, 18 Feb 2009 13:50:04 +0000 (14:50 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 18 Feb 2009 14:40:53 +0000 (15:40 +0100)
* HACKING: A beginner's commit-to-master is so common,
and causes enough confusion, that we describe how to recover.

HACKING

diff --git a/HACKING b/HACKING
index f6d878f14c8cff9743e198569d21d5073ddf891f..bf9a45e04d1bb7895d8eda9a790b571ac4a58a69 100644 (file)
--- 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