Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to merge branches on github.com without doing pull request?

Tags:

It looks like GitHub only allows merging of branches by making a pull request and then merging.

Is there a way to merge mobile into master in a single step without cloning locally?

I only see this button, which creates a pull request that needs to be merged in a second step:

Compare, review, create a pull request

like image 209
fregante Avatar asked Jun 18 '14 03:06

fregante


People also ask

Can you merge a branch without a pull request?

It looks like GitHub only allows merging of branches by making a pull request and then merging. Is there a way to merge mobile into master in a single step without cloning locally? There's no way without using a pull request.

How do I merge two branches automatically?

Enable automatic branch merging for a single repositoryGo to Repository settings > Branches. Under Automatic merging, select the On status and then select Save.

How do I merge a branch without committing?

With --no-commit perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing. Note that fast-forward updates do not create a merge commit and therefore there is no way to stop those merges with --no-commit.


2 Answers

Github does not provide such a mechanism - and by following best practices, it doesn't make sense for them to provide such a feature.

The steps are to Merge it on your machine, then Push:

git merge mobile git push 

Pull requests are really only for repositories you don't control, and/or some code review process.

Per comments on the question, if this isn't convenient for you, very likely it is a sign of going against best practices, hindering your ability to work correctly.

like image 156
Eevee Avatar answered Sep 23 '22 06:09

Eevee


Github does not provide this functionality via the web UI at this point.

like image 31
Daenyth Avatar answered Sep 19 '22 06:09

Daenyth