Create a repository on GitHub

Photo by Pankaj Patel on Unsplash

You can store a project in GitHub repositories. You can share your code with your teammates or other people. And you can see and use people’s code.

How can i create a repo?

Enter you Github account, on your dashboard you will see your Repositories. Click the New button(It is a green button). You will see a page like this:

1-You should type a short, memorable name for your repository. For example, if you push your java projects you can write “My-JavaProjects”.

2-Optionally, add a description of your repository. For example, “My repository for java projects.”

3-Choose a repository visibility. (Public or Private)

Public : Anyone on the internet can see this repository. You choose who can commit.

Private : You choose who can see and commit to this repository.

4-Click Add README file.

This is where you can write a long description for your project. People can read your README file and understand your repo more easily.

5-Add .gitignore, optional

I do not but if you need you can add .gitignore.

“You can create a .gitignore file in your repository’s root directory to tell Git which files and directories to ignore when you make a commit. To share the ignore rules with other users who clone the repository, commit the .gitignore file in to your repository.”

6-Choose a license, optional

I do not but if you need you can add a license. A license tells others what they can and can’t do with your code.

“Public repositories on GitHub are often used to share open source software. For your repository to truly be open source, you’ll need to license it so that others are free to use, change, and distribute the software.”

Click the CREATE REPOSITORY. Now your repo is ready to use. You can start to push your files from your local.

Enjoy your repo. :)



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store