File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,14 @@ Fortunately, Git has a feature called `rebase` that allows you to clean up your
138138If you want to learn more,
139139[ GitHub - About Git rebase] ( https://docs.github.com/en/get-started/using-git/about-git-rebase )
140140provides a comprehensive overview of ` rebase ` .
141+
142+ > ** Warning**
143+ We suggest considering to ` rebase ` only those commits that haven't been pushed to a public branch.
144+ Rebasing existing commits would block merging because we don't allow force pushes to the repository.
145+ If you need to tidy up commits that have already been pushed,
146+ it's generally better to use ` git revert ` for the sake of avoid causing confusion for other developers.
147+
148+
141149Here's a small gist that goes through the basics on how to use it:
142150
1431511 . Begin an interactive rebase: Use ` git rebase -i HEAD~N ` , where ` N ` is the number of commits
@@ -171,7 +179,3 @@ Here's a small gist that goes through the basics on how to use it:
171179 ``` sh
172180 git rebase --continue
173181 ```
174-
175- We suggest considering to ` rebase ` only those commits that haven't been pushed to a public branch.
176- If you need to tidy up commits that have already been pushed,
177- it's generally better to use ` git revert ` to avoid causing confusion for other developers.
You can’t perform that action at this time.
0 commit comments