Skip to content

Commit

Permalink
[TASK] Polish the git rebasing section in CONTRIBUTING.md (#1387)
Browse files Browse the repository at this point in the history
Part of #1360
  • Loading branch information
oliverklee authored Jan 6, 2025
1 parent 6871cdc commit 9600bc3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,20 @@ To rebase a feature branch to the latest `main`:
1. Make sure that your local copy of the repository has the most up-to-date
revisions of `main` (this is important, otherwise you may end up rebasing to
an older base point):
```sh
git checkout main
```bash
git switch main
git pull
```
1. Switch to the (feature) branch to be rebased and make sure your copy is up to
date:
```sh
git checkout feature/something-cool
```bash
git switch feature/something-cool
git pull
```
1. Consider taking a copy of the folder tree at this stage; this may help when
resolving conflicts in the next step.
1. Begin the rebasing process
```sh
```bash
git rebase main
```
1. Resolve the conflicts in the reported files. (This will typically require
Expand All @@ -168,8 +168,8 @@ To rebase a feature branch to the latest `main`:

If there were no conflicts, skip this and the next step.
1. Mark the conflicting files as resolved and continue the rebase
```sh
git add *.*
```bash
git add .
git rebase --continue
```
(You can alternatively use more specific wildcards or specify individual
Expand All @@ -180,7 +180,7 @@ To rebase a feature branch to the latest `main`:
If there are more conflicts to resolve, repeat the previous step then this
step again.
1. Force-push the rebased (feature) branch to the remote repository
```sh
```bash
git push --force
```
The `--force` option is important. Without it, you'll get an error with a
Expand Down

0 comments on commit 9600bc3

Please sign in to comment.