Skip to content

Commit 97c33c6

Browse files
trastgitster
authored andcommitted
Documentation: Refer to git-rebase(1) to warn against rewriting
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>
1 parent 90d1c08 commit 97c33c6

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Documentation/git-commit.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ It is a rough equivalent for:
144144
------
145145
but can be used to amend a merge commit.
146146
--
147+
+
148+
You should understand the implications of rewriting history if you
149+
amend a commit that has already been published. (See the "RECOVERING
150+
FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
147151

148152
-i::
149153
--include::

Documentation/git-filter-branch.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ the objects and will not converge with the original branch. You will not
3636
be able to easily push and distribute the rewritten branch on top of the
3737
original branch. Please do not use this command if you do not know the
3838
full implications, and avoid using it anyway, if a simple single commit
39-
would suffice to fix your problem.
39+
would suffice to fix your problem. (See the "RECOVERING FROM UPSTREAM
40+
REBASE" section in linkgit:git-rebase[1] for further information about
41+
rewriting published history.)
4042

4143
Always verify that the rewritten version is correct: The original refs,
4244
if different from the rewritten ones, will be stored in the namespace

Documentation/git-reset.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ $ git reset --hard HEAD~3 <1>
8282
+
8383
<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
8484
and you do not want to ever see them again. Do *not* do this if
85-
you have already given these commits to somebody else.
85+
you have already given these commits to somebody else. (See the
86+
"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for
87+
the implications of doing so.)
8688

8789
Undo a commit, making it a topic branch::
8890
+

0 commit comments

Comments
 (0)