Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in github, can I clone/merge branch online?

Tags:

github

I want to clone/merge branch for my git repository inside github, for example merge updates in draft branch to gh-pages for publish.

And in some cases, I don't have access to command line for git command.

Is it possible to achieve this online ?

like image 316
Larry Cai Avatar asked Oct 18 '12 09:10

Larry Cai


People also ask

How do I merge GitHub branches online?

In GitHub Desktop, click Current Branch. Click Choose a branch to merge into BRANCH. Click the branch you want to merge into the current branch, then click Merge BRANCH into BRANCH. Note: If there are merge conflicts, GitHub Desktop will warn you above the Merge BRANCH into BRANCH button.

What happens when you merge branches?

When you perform a merge, you effectively merge one branch into another—typically a feature branch or bug fix branch into a main branch such as master or develop. Not only will the code changes get merged in, but also all the commits that went into the feature branch.

Can you merge without 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 can I merge in GitHub?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Pull requests. In the "Pull Requests" list, click the pull request you would like to add to a merge queue. Click Merge when ready to add the pull request to the merge queue.


1 Answers

You can merge branches in GitHub using a Pull Request as long as the merge doesn't create any conflicts.

To merge a pull request on GitHub:

  1. Create a Pull Request to merge the draft branch into the gh-pages branch.
  2. If it can be merged online, you'll see This pull request can be automatically merged. and a Merge pull request button.
  3. Click the button and you'll have a chance to Cancel the merge or add a commit message and Confirm Merge.
  4. If you choose to Confirm Merge, the Pull Request will automatically close.

For more information, visit Github's Merging a Pull Request Help page.

like image 156
jmohr Avatar answered Oct 04 '22 10:10

jmohr