Skip to content

Commit 65f08c9

Browse files
author
benoit-cty
committed
doc rebase
1 parent 387a468 commit 65f08c9

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,31 @@ uv run --only-group doc task docs
281281

282282
to regenerate the html files.
283283

284+
### Rebase your branch on master
285+
286+
Before creating a PR, please make sure to rebase your branch on master to avoid merge conflicts and make the review easier. You can do it with the following command:
287+
```sh
288+
# Be careful, this command will delete every local changes you have, make sure to commit or stash them before running it
289+
TARGET_BRANCH=master
290+
current_branch=$(git symbolic-ref --short HEAD)
291+
git switch $TARGET_BRANCH && git pull
292+
git switch $current_branch --force && git fetch origin $TARGET_BRANCH
293+
git rebase $TARGET_BRANCH
294+
```
295+
296+
In case of a conflict during a rebase, "incoming" refers to your branch, and "current" refers to master. This is because the commits from your branch are being applied to master, so they are incoming. In case of a merge, it's the opposite!
297+
298+
Check if everything is fine:
299+
300+
```sh
301+
git status
302+
```
303+
304+
Push force
305+
```sh
306+
git push --force-with-lease
307+
```
308+
284309
<!-- TOC --><a name="release-process"></a>
285310
### Release process
286311

0 commit comments

Comments
 (0)