mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +02:00
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.
This commit is contained in:
11
HACKING
11
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
|
||||
|
||||
Reference in New Issue
Block a user