user-manual: clarify language about "modifying" old commits
It's important to remember that git doesn't really allowing "editing" or "modifying" commits, only replacing them by new commits. Redo some of the language to make this clearer. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
J. Bruce Fields committed
Nov 25, 2007 at 19:01 UTC
7cb192eab0251911e2ca77d4ecceb621dd2d34f5
1 file changed
+11
-9
Documentation/user-manual.txt
+11
-9
@@ -1416,8 +1416,8 @@ with the changes to be reverted, then you will be asked to fix
1416
conflicts manually, just as in the case of <<resolving-a-merge,
1417
resolving a merge>>.
1418
1419
-[[fixing-a-mistake-by-editing-history]]
1420
-Fixing a mistake by editing history
1419
+[[fixing-a-mistake-by-rewriting-history]]
1420
+Fixing a mistake by rewriting history
1421
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1422
1423
If the problematic commit is the most recent commit, and you have not
@@ -1440,7 +1440,7 @@ Again, you should never do this to a commit that may already have
1440
been merged into another branch; use gitlink:git-revert[1] instead in
1441
that case.
1442
1443
-It is also possible to edit commits further back in the history, but
1443
+It is also possible to replace commits further back in the history, but
1444
this is an advanced topic to be left for
1445
<<cleaning-up-history,another chapter>>.
1446
@@ -1977,7 +1977,7 @@ This can happen, for example, if you:
1977
1978
- use `git reset --hard` to remove already-published commits, or
1979
- use `git commit --amend` to replace already-published commits
1980
- (as in <<fixing-a-mistake-by-editing-history>>), or
1980
+ (as in <<fixing-a-mistake-by-rewriting-history>>), or
1981
- use `git rebase` to rebase any already-published commits (as
1982
in <<using-git-rebase>>).
1983
@@ -2472,11 +2472,11 @@ return mywork to the state it had before you started the rebase:
2472
$ git rebase --abort
2473
-------------------------------------------------
2474
2475
-[[modifying-one-commit]]
2476
-Modifying a single commit
2475
+[[rewriting-one-commit]]
2476
+Rewriting a single commit
2477
-------------------------
2478
2479
-We saw in <<fixing-a-mistake-by-editing-history>> that you can replace the
2479
+We saw in <<fixing-a-mistake-by-rewriting-history>> that you can replace the
2480
most recent commit using
2481
2482
-------------------------------------------------
@@ -2486,8 +2486,10 @@ $ git commit --amend
2486
which will replace the old commit by a new commit incorporating your
2487
changes, giving you a chance to edit the old commit message first.
2488
2489
-You can also use a combination of this and gitlink:git-rebase[1] to edit
2490
-commits further back in your history. First, tag the problematic commit with
2489
+You can also use a combination of this and gitlink:git-rebase[1] to
2490
+replace a commit further back in your history and recreate the
2491
+intervening changes on top of it. First, tag the problematic commit
2492
+with
2493
2494
-------------------------------------------------
2495
$ git tag bad mywork~5