Skip to content

Commit 9600bc3

Browse files
authored
[TASK] Polish the git rebasing section in CONTRIBUTING.md (#1387)
Part of #1360
1 parent 6871cdc commit 9600bc3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,20 @@ To rebase a feature branch to the latest `main`:
142142
1. Make sure that your local copy of the repository has the most up-to-date
143143
revisions of `main` (this is important, otherwise you may end up rebasing to
144144
an older base point):
145-
```sh
146-
git checkout main
145+
```bash
146+
git switch main
147147
git pull
148148
```
149149
1. Switch to the (feature) branch to be rebased and make sure your copy is up to
150150
date:
151-
```sh
152-
git checkout feature/something-cool
151+
```bash
152+
git switch feature/something-cool
153153
git pull
154154
```
155155
1. Consider taking a copy of the folder tree at this stage; this may help when
156156
resolving conflicts in the next step.
157157
1. Begin the rebasing process
158-
```sh
158+
```bash
159159
git rebase main
160160
```
161161
1. Resolve the conflicts in the reported files. (This will typically require
@@ -168,8 +168,8 @@ To rebase a feature branch to the latest `main`:
168168

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

0 commit comments

Comments
 (0)