Share via


Small Basic: Revision Control with GitHub

This article is about revision control with GitHub Desktop and GitHub for Microsoft Small Basic programming language.  And also revised version of Small Basic: Revision Control - which is talked about Git GUI and CodePlex.  Note that CodePlex will shutdown on December 15, 2017.

Small Basic programs can be published with [Publish] button,  And with following instructions, a Small Basic program can have the revision number of the program ID.

  1. [Import] program with its' program ID.
  2. Modify the program.
  3. [Publish] the program.

But in some case listed below, it is useful to use advanced revision control tools for Small Basic.

  • The program is too large to [Publish].
  • The program needs some extra files such as images, sounds and data.
  • Need to manage issues or documents.

This article illustrates how to download Small Basic source from GitHub, revise the program in local with GitHub Desktop, and publish the revised version as a candidate. 

GitHub

GitHub is the online revision control site.  To start using GitHub and GitHub Desktop, following steps are needed.

  • Create GitHub account.
  • Ask repository owner to allow to collaborate.

Create GitHub Account

Visit github.com and push [sign up for GitHub] button.

Confirm your user name, email address and password.  Then push [Create an account] button. 

Click [Yes] to save your password, and click [Continue]. 

Fill information and click [Submit].

Receive email from GitHub titled "[GitHub] Please verify your email address." and click a link "Verify email address".

Suggest Collaboration to Owner 

The GitHub account created above should be noticed to the repository owner.  A repository is a place to store source code and revision history.  So the account will be allowed to collaborate with the repository.  Suggest collaboration to the owner by any tool with the information about the account and the repository.  Repositories can be found with search box in GitHub site.  The search keyword will be:

  • a repository name such as "IconEdit"
  • a owner name and slash such as "nonkit/"
  • a topics name such as "small-basic"

An email titled "<owner> invited you to <owner>/<repository>" will be sent if the owner set the account as a collaborator.  Click [View Invitation] to see the invitation.

Click [Accept Invitation] to accept.

GitHub Desktop

GitHub Desktop is a local revision control tool.  A collaborator can have a local repository in a PC. 

Install GitHub Desktop

Visit desktop.github.com and click [Download GitHub Desktop].  See more detail in the Help.

Clone Repository

To clone is to copy an online repository to a local PC.  In a GitHub repository, click [Clone or download] and select [Open in Desktop].  This option means open GitHub Desktop after cloning.

Select a directory to copy the repository in following pop-up with GitHub Desktop.  The default place is Documents/GitHub/<repository>.

Create New Branch

Branch is a revision.  Click branch icon, input the branch name and click "Create new branch."  This operation is preparation to modify the source code.

Modify Source

Modify the source program with the Small Basic Environment and test it.

Commit Modification

To commit is reflect modification to the local repository.  Select the most right ring on the branch graph in GitHub Desktop, select source files to commit, input Summary and Description for the commit, then push [Commit to <branch>] button.

Push Commit

To push is to copy the modification to the online repository as a branch**. ** Click [Publish] button.

Send Pull Request

Pull Request is the request to the owner to merge the branch to the master.  Master is the original latest revision.  Push [Pull request] button and push [Send pull request] button.  If the request is accepted, an email containing "The <branch> branch has been merged." will be sent to the collaborator.

Return to Master

After merged, master branch is modified like the branch.  Select master beside the branch icon. This action switches the source directory as the same as the latest master.

See Also

Additional Resources