Keeping Git branches up to date, waiting for them to merge upstream

I developed the GitHub project, implemented several functions and fixed several errors in separate branches, sending download requests for all of them.

Waiting for their initial position, I want to use all these functions and corrections. To do this, I create a branch "my master", starting with "upstream / master" and merging all the changes from other branches that are not yet in the upstream. I also write a list of patches fixed in README.md.

When one of my patches is sent to the upstream, there is no reason to continue this thread, so I delete it.

This works, BUT, there is a problem with this approach:

From time to time I need to reinstall all my unaccepted branches in order to keep them up to date. After that I need to recreate the branch "my master" and update it README.md again.

Is there a way to speed up or automate this?

Please do not advise me to try git-up . This is useful, but does something else.

+6
source share
1 answer

One way is to reinstall your branch to the upstream every time there is a release. You might want to create a tag on a branch of a branch of a branch, or a branch name with a version date so that you don't lose your old history after garbage collection.

Or you can use the merge rebase script that msysgit uses https://github.com/msysgit/msysgit/blob/master/share/msysGit/merging-rebase.sh , which gives the impression of a continuous line (via the second parent), which is equivalent the above reload processes.

In both cases, you save a set of commits that you were happy with if your fix for outages (from conflicts) eventually becomes problematic.

This covers two issues:

  • the upstream is slowly updating (relative to the speed you want / need)
  • upstream is targeting a different β€œplatform”, and you will always need β€œtop” fixes for your platform / target.
+1
source

Source: https://habr.com/ru/post/956266/


All Articles