Skip to content

Commit b4ac3fa

Browse files
committed
don't encourage people to force push ever
1 parent 179c999 commit b4ac3fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

book/03-git-branching/1-git-branching.asc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,12 +987,13 @@ That's how it happened, and the repository should preserve that for posterity.
987987
The opposing point of view is that the commit history is the *story of how your project was made.*
988988
You wouldn't publish the first draft of a book, and the manual for how to maintain your software deserves careful editing.
989989
This is the camp that uses tools like rebase and filter-branch to tell the story in the way that's best for future readers.
990-
If that requires a force-push every now and then, so be it.
991990

992991
Now, to the question of whether merging or rebasing is better: hopefully you'll see that it's not that simple.
993992
Git is a powerful tool, and allows you to do many things to and with your history, but every team and every project is different.
994993
Now that you know how both of these things work, it's up to you to decide which one is best for your particular situation.
995994

995+
In general the way to get the best of both worlds is to rebase local changes you've made but haven't shared yet before you push them in order to clean up your story, but never rebase anything you've pushed somewhere.
996+
996997
=== Summary
997998

998999
We've covered basic branching and merging in Git.

0 commit comments

Comments
 (0)