0

When I have at Github a main (master) project

 https://github.com/MyUser/MyProject

and some active but non-default branch, listed in MyProject/branches, and with an URL like

 https://github.com/MyUser/MyProject/tree/MyBranchName

how to merge (with Github interface) MyBranchName to master?

NOTE: if really easy, only one command, how to do it by git command on terminal?


The result at https://github.com/MyUser/MyProject/compare/MyBranchName?expand=1 is "There isn't anything to compare"... No more clues, no more interface to create a "merge" or "fork" or "...".

Peter Krauss
  • 13,174
  • 24
  • 167
  • 304

1 Answers1

2

This only works if the branches are compatible, but that can be said as well from the command line.

Go to the branch using the branch drop down on the repository page. once you are on the branch, click the green pull request icon beside it. It will create a pull request to move all commits from your branch into your master repository.

If the branches are compatible, you should be now able to click merge.

Make sure the merge direction is right reviewing the commit history!

Lorenzo Boccaccia
  • 6,041
  • 2
  • 19
  • 29
  • The branch is only a new file, is very simple, add a file to the master. The result at `https://github.com/MyUser/MyProject/compare/MyBranchName?expand=1` is *"There isn't anything to compare"*... No more clues, no more interface to create a "merge" or "fork" or "...". – Peter Krauss Mar 21 '15 at 15:13
  • are you sure the branches have any difference? maybe you didn't push some commit? you can check quite easily if the branch actually contains content that the master doesn't have, by going to the network view like so: https://github.com/OpenNTF/SocialSDK/network – Lorenzo Boccaccia Mar 23 '15 at 12:54
  • Yes, they are so different (!), but the intersection is empty. The *master* have one file, the `README.md`; the *branch* have many files (and no one is README). See http://stackoverflow.com/q/29184375/287948 – Peter Krauss Mar 23 '15 at 13:50