Create and Publish Repository using GitHub App

Here's the step-by-step guide on how create your local Git Repository, track changes in your local repo and upload repository and changes in GitHub using Github Desktop App

Download and Install GitHub Desktop

NOTE: In order to connect to your GitHub repositories you need to have an account in GitHub. Sign up in GitHub here 👉 GitHub site

  • Once installed and you are signed up in GitHub. Go to File > Options > Accounts then sign in your account.

    github

    github

    Click “Continue with browser”, it will redirect to github website and you would need to sign in your account there:

    github

    You’re signed in when you see your Github account in this window:

    github

Create local repository

Creating a local repository means having the capability to track changes on your files locally. To create a local repo:

  • Select File then Add local repository:

    github

  • A window will show where you need to choose the path or folder that you want to create a local repository on (where you want to track changes). Click “Choose”:

    github

  • Browse to the path, select the folder and click “Select Folder”:

    github

  • Since the folder is not a git repo yet, click “Create a repository”:

    github

  • On this window, you need to provide the following information:

    • Name - this will be the name of your local repository, by default it is named as the folder you selected

    • Description - here you can provide explanation or details about the repository you’re creating

    • README File - tick this option if you want to include a README file in your repository. A README file is a file where you can put information about your repository.

    • Git ignore - a file that contains the files or type of files that you want to exclude from tracking. Putting file or file types means changes to those files won’t be track in the repository. Since the repository here includes a C# project, I choose “Visual Studio” to exclude unnecessary Visual Studio files from tracking.

    • License - choose here the type of license applicable to your repository. Here I’ll select None.

      Click “Create Repository” once done providing and selecting information:

      github

  • After creating the repository you will see that the current repository is pointed to the recently created repository - “CSharpSamples”.

    (also close the previous window if it didn’t close automatically)

    github

Now, you have created a local repository.

Any changes done to the folder and it’s contents will be tracked.

👉 Click here to see how to save (commit) changes to your local repository

Publish your local repository to GitHub

At this point your repository is still in your local machine.

If you click “History” on the left side pane, you will see your “initial commit” or initial save in your local repository.

github

In GitHub App, if you have a local repository that is not yet “published” or “uploaded” in Github website, the “Publish repository” icon is shown.

Publishing the repository means we want the local repository to be available in GitHub website:

  • Click “Publish repository”:

    github

  • On the following window, you can provide the following information about the repository to be published in GitHub:

    • Name - this will be the name of the repository in GitHub. By default, it is named the same as the local repository. You may change it with a different name.

    • Description - information about your repository. By default, it is the same as declared in the local repository.

    • Private or Public - tick or check the “Keep this code private” if you want your repository to be accessible only to those with permissions. Untick or uncheck this if you want your code to be accessible by anyone (public).

    • Organization - select the organization if you want to save your repo to a specific organization that you have.

      Click “Publish Repository”:

      github

  • After publishing, on the left pane right-click on the “Current Repository” then “View on Github”. It will go to the published repository in Github website:

    github

    github