File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,10 @@ What do you think are pros & cons of each of these branching workflows?
337
337
338
338
### What happens when my feature branch falls behind main?
339
339
340
+ There are a few ways you can fix this problem.
341
+
342
+ #### Using merge
343
+
340
344
> How to catch up a branch that has fallen behind the ` main ` branch using the command line:
341
345
>
342
346
> - run ` git pull origin main ` to pull any changes from the remote version of main that we might not have
@@ -345,6 +349,14 @@ What do you think are pros & cons of each of these branching workflows?
345
349
> - run ` git push origin <branch> ` to push our updated branch to the remote
346
350
347
351
352
+ #### Using rebase
353
+
354
+ 1 . Make sure everything is committed in your new branch
355
+ 2 . Move to the main branch: ` git switch main `
356
+ 2 . Make sure the main branch is up to date: ` git pull origin main `
357
+ 3 . Move back over to your branch: ` git switch <branch> `
358
+ 4 . Update the changes from main: ` git rebase main `
359
+
348
360
## Next:
349
361
350
362
- file and directory structure for data analysis projects
You can’t perform that action at this time.
0 commit comments