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
138
138
If you want to learn more,
139
139
[ GitHub - About Git rebase] ( https://docs.github.com/en/get-started/using-git/about-git-rebase )
140
140
provides 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
+
141
149
Here's a small gist that goes through the basics on how to use it:
142
150
143
151
1 . 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:
171
179
``` sh
172
180
git rebase --continue
173
181
```
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