Wrong
Wrong

Reputation: 1263

Git - Is it good to re-create a branch after a big change in another?

imagine I have branch called 'feature/login' and many other branches that I've merged to the 'develop' branch and they have very big changes.

Would it be good to delete the 'feature/login' branch (after already doing changes and merging it to develop) if 'develop' is much much ahead this branch and then re-create it?

Thanks

Upvotes: 2

Views: 124

Answers (1)

Aleksandr Neizvestnyi
Aleksandr Neizvestnyi

Reputation: 578

There are few approaches to work with different active branches and keep them up to date:

  1. You can merge origin/develop to your 'feature/login' branch, and better to do it during you are working on 'feature/login'.
  2. If there are a lot of changes in develop branch and merging can be hard, it would be easier to use rebase
  3. And also, it is possible to delete your branch and re-create it if all changes from this branch had already merged. Probably this is fastest approach for some situations.

And Before do any merging it is better to pull origin via git pull --all to pull all branches.

Upvotes: 2

Related Questions