Skip to content

Commit da5d9a3

Browse files
committed
Add caution: don't amend pushed commits
1 parent 26e50c1 commit da5d9a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

book/02-git-basics/sections/undoing.asc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ Effectively, it's as if the previous commit never happened, and it won't show up
3939
The obvious value to amending commits is to make minor improvements to your last commit, without cluttering your repository history with commit messages of the form, ``Oops, forgot to add a file'' or ``Darn, fixing a typo in last commit''.
4040
====
4141

42+
[CAUTION]
43+
====
44+
Only amend commits that are still local and have not been pushed somewhere.
45+
Amending previously pushed commits, and force pushing the branch will cause problems for your collaborators.
46+
====
47+
4248
[[_unstaging]]
4349
==== Unstaging a Staged File
4450

0 commit comments

Comments
 (0)