Skip to content

Commit

Permalink
Documentation: Refer to git-rebase(1) to warn against rewriting
Browse files Browse the repository at this point in the history
This points readers at the "Recovering from upstream rebase" warning
in git-rebase(1) when we talk about rewriting published history in the
'reset', 'commit --amend', and 'filter-branch' documentation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Sep 16, 2008
1 parent 90d1c08 commit 97c33c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Documentation/git-commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ It is a rough equivalent for:
------
but can be used to amend a merge commit.
--
+
You should understand the implications of rewriting history if you
amend a commit that has already been published. (See the "RECOVERING
FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)

-i::
--include::
Expand Down
4 changes: 3 additions & 1 deletion Documentation/git-filter-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ the objects and will not converge with the original branch. You will not
be able to easily push and distribute the rewritten branch on top of the
original branch. Please do not use this command if you do not know the
full implications, and avoid using it anyway, if a simple single commit
would suffice to fix your problem.
would suffice to fix your problem. (See the "RECOVERING FROM UPSTREAM
REBASE" section in linkgit:git-rebase[1] for further information about
rewriting published history.)

Always verify that the rewritten version is correct: The original refs,
if different from the rewritten ones, will be stored in the namespace
Expand Down
4 changes: 3 additions & 1 deletion Documentation/git-reset.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ $ git reset --hard HEAD~3 <1>
+
<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
and you do not want to ever see them again. Do *not* do this if
you have already given these commits to somebody else.
you have already given these commits to somebody else. (See the
"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for
the implications of doing so.)

Undo a commit, making it a topic branch::
+
Expand Down

0 comments on commit 97c33c6

Please sign in to comment.