0

I'm still relatively new to git / Github and struggling with the following:

I have a repo with the branch main. I've created a couple of new branches that are based on main. I want to be working on these new branches individually, but sometimes I would like to change some 'core features' and change the main branch, and eventually also see these changes on the other branches.

I'm not sure how to do this. I've already created the repo and branches (also remote), but if I change the main branch then I don't know how to reflect those changes on the other branches.

droomoord
  • 33
  • 3
  • 1
    From the other branches you can `git rebase main` to update them to include the latest changes from the `main` branch. – Cory Kramer Apr 04 '22 at 12:56
  • 1
    If you are new to Git/GitHub and want to stay within tools you are familiar with (such as pull requests) you can also, after updating `main` create a new branch from main and create a pull request from the feature branch into that new branch. The result of that PR will generate the same outcome as `rebase` but within the GUI tools of GitHub. Keep working in the new branch and delete the old feature branch. – TheIceBear Apr 04 '22 at 13:04

0 Answers0