Alternative Branching

Now that we have learnt the steps for raising an Issue, creating a Branch and creating & merging a Pull Request.

How about doing all of this from within GitHub.dev Web-Editor.

Open your repository in GitHub.dev Web-Editor

On the left hand side Activity Bar (icon panel) click the GitHub Octocat icon GitHub Octocat icon

This opens a tab for GitHub with two section, the top section titled "Pull Requests" and the bottom section "Issues". If you move your mouse over the Issues section you will see some icons appear

Click on the +

A NewIssue.md file will now open in the editor for you to fill out the ticket details in

The first line is the "Issue Title", replace this text with your title

Then enter your Issue details underneath "Labels" leaving a blank line between them

Next click the

This creates the Issue and a pop up box offers you to go to the newly raised Issue, which if we wait will disappear in a moment

Now look back to the Issues panel in the editor and click on the update (refresh) icon

Then click the > before "Created Issues" you will see your newly created issue

If you now mouse over it you will see two icons appear click on the arrow which is "Start Working on Issue and Checkout Topic Branch"

The editor will reopen

If you now look at the bottom Status Bar you will see a green GitHub button, next to it is the Branch you are using, this is no longer main but should be something like "your_username/issue3"

This shows we are in a working branch and commits to this branch will not be published just yet to our hosting

We are now free to make any update changes to the file, then stage and commit back to this branch

When you are happy you have all your changes done, you can make a pull request to add them into the "Main Branch"

To do this we again click the GitHub Octocat icon GitHub icon

Now in the top section near the title "Pull Requests" you will see the Create Pull request icon icon which is "Create Pull Request" click on it

The panel will now update and you will see these boxes with your details in

Merge Changes from

  • Username / Repository
  • Username / Branch Name

Into

  • Username / Repository
  • Username / Branch Name

We need to enter a title & description for this Pull Request

Then tick "Create as Draft" button

Next click the blue Create button

A Page will open with details of our new pull request. Here we can double check the details

Click the Ready to Review button

You will now see a blue "Merge Pull Request" button, next to it says using method with a pull down options box that says "Create Merge Commit" we are going to use this method so you can click the blue Merge Pull Request

Then enter your commit message (or keep the one it auto fills if you wish) and click Create Merge Commit button

You can see just under the title of your pull request a purple "merged", then further down the page you will see "Pull request successfully merged"

Then a "Delete Branch" button. Click this as we no longer need this branch

A pop up bar will appear at the top of the screen, you need to click the blue Ok button

The editor will now restart and go back to the "Main Branch" which you can see on the status bar (bottom left)

The one thing that this method of Pull Request does not do is close the issue

So you need to open the issue again to close it

We can do this by clicking the GitHub Octocat icon GitHub icon in the activity bar again

Then in the Issues panel click and expand "Created Issues" again and this time click on the globe icon Open Issue on GitHub globe icon which is "Open Issue on GitHub"

Then you will see the button to close Issue with a pull down, we chose the "Close as Complete" option then clicked the Close Issue button

Page Last Edited: