File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -142,20 +142,20 @@ To rebase a feature branch to the latest `main`:
142
142
1 . Make sure that your local copy of the repository has the most up-to-date
143
143
revisions of ` main ` (this is important, otherwise you may end up rebasing to
144
144
an older base point):
145
- ``` sh
146
- git checkout main
145
+ ``` bash
146
+ git switch main
147
147
git pull
148
148
```
149
149
1 . Switch to the (feature) branch to be rebased and make sure your copy is up to
150
150
date:
151
- ``` sh
152
- git checkout feature/something-cool
151
+ ``` bash
152
+ git switch feature/something-cool
153
153
git pull
154
154
```
155
155
1 . Consider taking a copy of the folder tree at this stage; this may help when
156
156
resolving conflicts in the next step.
157
157
1 . Begin the rebasing process
158
- ``` sh
158
+ ``` bash
159
159
git rebase main
160
160
```
161
161
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`:
168
168
169
169
If there were no conflicts, skip this and the next step.
170
170
1 . Mark the conflicting files as resolved and continue the rebase
171
- ``` sh
172
- git add * . *
171
+ ``` bash
172
+ git add .
173
173
git rebase --continue
174
174
```
175
175
(You can alternatively use more specific wildcards or specify individual
@@ -180,7 +180,7 @@ To rebase a feature branch to the latest `main`:
180
180
If there are more conflicts to resolve, repeat the previous step then this
181
181
step again.
182
182
1 . Force-push the rebased (feature) branch to the remote repository
183
- ``` sh
183
+ ``` bash
184
184
git push --force
185
185
```
186
186
The ` --force ` option is important. Without it, you'll get an error with a
You can’t perform that action at this time.
0 commit comments