GitHub: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Created page with "== What is GitHub? == GitHub is a web service to help you organize and manage your projects. At its core, it runs a version control system called [https://en.wikipedia.org/wi..."
 
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
== What is GitHub? ==
== What is GitHub? ==


GitHub is a web service to help you organize and manage your projects. At its core, it runs a version control system called [https://en.wikipedia.org/wiki/Git git]. Git is not user friendly enough for most users. GitHub Inc. created a web interface and backend for git, making it much easier to use and extending its features. As of June 2018, over 57,000,000 projects were hosted on GitHub.
GitHub is a web service to help you organize and manage your projects. At its core, it runs a version control system called [https://en.wikipedia.org/wiki/Git git]. As git is not user friendly enough for most users, GitHub Inc. created a web interface and backend for git, making it much easier to use and extending its features. As of June 2018, over 57 million projects were hosted on GitHub. On June 4, 2018, Microsoft announced it had reached an agreement to acquire GitHub.  


Advantages of using GitHub are:
Advantages of using GitHub are:
* Version Control: Each change to your project is recorded. You can see when changes were made when.
* Version Control: Each change to your project is recorded. You can see when changes were made and by who.
* Branch: You can checkpoint a project at a certain point and easily go back to that point. For example, you could have an experimental branch without disturbing the main project.
* Branching: You can checkpoint a project at a certain point and easily go back to that point. For example, you could have an experimental branch without disturbing the main project.
* Issues: You can keep track of bug and work to be done on the project.
* Issues: You can track bugs and the work to be done on the project.
* Milestores: You can group your issues in milestones, with a due date.
* Milestones: You can group your issues in milestones, with a due date.
* Developers: If there are multiple developers on a project, GitHub makes sure they do not overwrite each others work. It also allows the team to communicate effectively with one another.
* Developers: If there are multiple developers on a project, GitHub makes sure they do not overwrite each others work. It also allows the team to communicate effectively with one another.
* Backup: You will now have another backup of your project.
* Replication: Want to install your project to another system? You can clone it anywhere there is an internet connection.


=== Pricing ===
=== Pricing ===
GitHub is free for public and open source projects. The [https://github.com/pricing cheapest plan] is Developer for $7/month, which includes Personal account, Unlimited public repositories, Unlimited private repositories and Unlimited collaborators
 
GitHub is free for public and open source projects. The [https://github.com/pricing cheapest paid plan] is Developer for $7/month, which includes Personal account, unlimited public repositories, unlimited private repositories and unlimited collaborators.


== Setting up GitHub ==
== Setting up GitHub ==
1. [https://github.com Open a GitHub account]. There are a lot of options - but you don't have to worry about all of them to get started. They make it as easy as possible, with lots of help on the site.
2. [https://desktop.github.com Download the GitHub Desktop]. Both Windows and MacOS are supported.
3. Using the GitHub Desktop, log into your GitHub account.


== Using GitHub with AppStudio ==
== Using GitHub with AppStudio ==
Starting with AppStudio 7, any AppStudio projects can be loaded into GitHub. Here's how to do some common operations:
=== Add an Existing AppStudio Project to GitHub ===
1. In the GitHub Desktop, choose "New Repository..." from the File menu. Enter the name of your project folder, including ".appstudio" into Name. "Local Path" should contain the directory your project folder is in. Click on "Create Repository".
[[File:GitHubNewRepository.png|300px]]
2. The repository will now appear in the GitHub Desktop. Click on "Publish repository" at the top right of the screen. It will ask to confirm that you want to publish the repository, then it will upload it to the GitHub website.
[[File:GitHubDesktop.png|750px]]
3. You can now go to the [https://github.com GitHub website] and see your project there. You can see the directories and files which make up your project. Explore some of the options and features.
[[File:GitHubProject1.png|750px]]
=== Modifying an AppStudio App ===
Now that we have our project in a GitHub repository, what happens if we modify our app? Let's add a script to a button in AppStudio and save the project. Here is the updated Github Desktop. Notice that two files have changed: Button1.json now has a link to the script, and Form1.bas has the new code.
Review your changes here to make sure they are what you want, fill in a description and "Commit to master". When you are ready to push all your changes to the GitHub website, click on "Push origin" at the top of the screen.
[[File:GitHubProject1.1.png|750px]]
Have a look at the History tab in GitHub Desktop. You will see the changes you have made to the project. If another developer also made changes to the project, those changes will appear as well. It's an easy way to see what your collaborators have been up to.
[[File:GitHubProject1.2.png|750px]]

Latest revision as of 17:30, 10 October 2018

What is GitHub?

GitHub is a web service to help you organize and manage your projects. At its core, it runs a version control system called git. As git is not user friendly enough for most users, GitHub Inc. created a web interface and backend for git, making it much easier to use and extending its features. As of June 2018, over 57 million projects were hosted on GitHub. On June 4, 2018, Microsoft announced it had reached an agreement to acquire GitHub.

Advantages of using GitHub are:

  • Version Control: Each change to your project is recorded. You can see when changes were made and by who.
  • Branching: You can checkpoint a project at a certain point and easily go back to that point. For example, you could have an experimental branch without disturbing the main project.
  • Issues: You can track bugs and the work to be done on the project.
  • Milestones: You can group your issues in milestones, with a due date.
  • Developers: If there are multiple developers on a project, GitHub makes sure they do not overwrite each others work. It also allows the team to communicate effectively with one another.
  • Backup: You will now have another backup of your project.
  • Replication: Want to install your project to another system? You can clone it anywhere there is an internet connection.

Pricing

GitHub is free for public and open source projects. The cheapest paid plan is Developer for $7/month, which includes Personal account, unlimited public repositories, unlimited private repositories and unlimited collaborators.

Setting up GitHub

1. Open a GitHub account. There are a lot of options - but you don't have to worry about all of them to get started. They make it as easy as possible, with lots of help on the site.

2. Download the GitHub Desktop. Both Windows and MacOS are supported.

3. Using the GitHub Desktop, log into your GitHub account.

Using GitHub with AppStudio

Starting with AppStudio 7, any AppStudio projects can be loaded into GitHub. Here's how to do some common operations:

Add an Existing AppStudio Project to GitHub

1. In the GitHub Desktop, choose "New Repository..." from the File menu. Enter the name of your project folder, including ".appstudio" into Name. "Local Path" should contain the directory your project folder is in. Click on "Create Repository".

2. The repository will now appear in the GitHub Desktop. Click on "Publish repository" at the top right of the screen. It will ask to confirm that you want to publish the repository, then it will upload it to the GitHub website.

3. You can now go to the GitHub website and see your project there. You can see the directories and files which make up your project. Explore some of the options and features.

Modifying an AppStudio App

Now that we have our project in a GitHub repository, what happens if we modify our app? Let's add a script to a button in AppStudio and save the project. Here is the updated Github Desktop. Notice that two files have changed: Button1.json now has a link to the script, and Form1.bas has the new code.

Review your changes here to make sure they are what you want, fill in a description and "Commit to master". When you are ready to push all your changes to the GitHub website, click on "Push origin" at the top of the screen.

Have a look at the History tab in GitHub Desktop. You will see the changes you have made to the project. If another developer also made changes to the project, those changes will appear as well. It's an easy way to see what your collaborators have been up to.