Joel Olawanle
Posted on October 19, 2020
In Programming or in Github, we usually see a repository as a folder for your project which contains all of your project's files and stores each file's revision history. Github allows users to create either a private repository or public repository depending on the user.
A short form for a repository is 'repo'. You can own repositories individually, or you can share ownership of repositories with other people in an organization.
Creating a Repository
Once you have a Github account, you can easily create a repository. if you are logged in you can easily visit https://github.com/new to create a new Repo or make use of any of the options in the image below.
Once that is done you would need to fill the form that appears, You will fill in the repo name, a little description(optional), choose if you want a private or public repo, you can also add a README file, e.t.c. Once you are done filling the form, click on the "Create repository" button.
Public vs Private Repository
This is usually referred to as repository visibility. This allows you to restrict who has access to a repository by choosing a repository's visibility: public, private, or even internal for Github enterprise account usually for an organization.
Public repositories are accessible to everyone on the internet while Private repositories are only accessible to you and people you explicitly share access with.
When a project or repository is active you can always change its visibility.
For user-owned repositories, you can give other people collaborator access so that they can collaborate on your project.
Note: To invite a collaborator you would need either the username, full name, or email the individual used to open his/her GitHub account.
That's all about creating a Github repository.
Note: Creating a repository simply means you have set up your project folder, the next phase would be to either create files on your repository or upload files from your local computer to your repository.
This can be achieved either by doing the regular upload of files we are all familiar with or we make use of git via your Command Line Interface (CLI). I will leave everything about git and the CLI for a dedicated topic.
Creating & Uploading files on Github
To create a file on GitHub is very easy, click on the create a new file link/button and input a file name. If you want to upload, it's also very easy, you just have to click the upload an existing file link/button and upload your files.
or this if you already have some files in your repository
To round up everything about repositories, the last thing I will be explaining is how to clone a repository and why we clone repositories.
Cloning a repository from GitHub
When you create a repository on GitHub, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.
There are so many options that could be used to clone a repository. You can either make use of git by copying the remote URL, download a zip file or open with Github desktop. It depends on you. I would explain everything about git here.
As always, any questions or suggestions, please feel free to leave a response or tweet me π€! Be sure to connect with me on socials! π
Posted on October 19, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.