Skip to content

Commit 01da1cb

Browse files
authored
Add warnings on top
1 parent 7b2c3d2 commit 01da1cb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/HowToGuides/FAQ.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ Fortunately, Git has a feature called `rebase` that allows you to clean up your
138138
If you want to learn more,
139139
[GitHub - About Git rebase](https://docs.github.com/en/get-started/using-git/about-git-rebase)
140140
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+
141149
Here's a small gist that goes through the basics on how to use it:
142150

143151
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:
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.

0 commit comments

Comments
 (0)