Rajeev Hegde
Rajeev Hegde

Reputation: 41

How to Automatically merge a branch into another in Github?

I want to automatically merge commits from master into another parallel branch which is used for different deployment strategy. So essentially whenever there is a change in master I want that change to be merged into one more branch automatically.

Is there a way in Github UI to do so?

Upvotes: 3

Views: 2963

Answers (1)

VonC
VonC

Reputation: 1324577

Github does support automerge, but only for Pull Request.

You might check out a GitHub Action like action-automerge

GitHub action to automatically merge the source branch into a target branch every time a change is made.

You can add a GitHub Action workflow to your project in order to enable that "action-automerge".

That being said, maybe you have other approaches which would be simpler than merging master/main. Using the same branch but with a deployment script able to detect its execution environment would be easier.

Upvotes: 1

Related Questions