Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 25, 2022 03:19 am GMT

How to Create a New Reposiorty on Github

Introduction
There are different means of pushing your project to GitHub, it can be done manually on your Github account by dragging and dropping the file to your account or making use of Git Command and there is the advantage of using git to push to your GitHub account, But first, you must have a Github account that will help you to be able to connect it with your git and you can make use of your terminal or your command prompt as a window user but it is always advisable to use your Git.

Definition
What is Git?

Git is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

What is Github?
GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. This tutorial teaches you GitHub essentials like repositories, branches, commits, and pull requests.

Personal Experience when I refuse to push my project to Github
As a developer, there is always a need for you to save your project. Still, funny enough some people will say they have their Hard disk and their external storage to keep their folders and project or probably their flash drive, but am sharing this because of the problem I faced some months ago after doing numbers of the project and my hard disk got crashed I was very sad and unhappy but everything I worked for both day and night was gone. Still, some came back to me that have some of my projects pushed to my Github account I mean I was so glad and happy to continue with my project after a long period.

But come to think of it, sharing my side of the story is just to let you know that saving money in the bank is good and likewise saving (pushing) your project online(Github) is very important, I like to give you the steps needed to push your project on GitHub with ease

Let's Go

Steps involved pushing your project on Github
The following is the command for git on how to push to GitHub, The following will guide you on how to push your code to Github by using git

Step 1:- Open your Github Account, Click on New which will direct you to create a new repository

github image 1

Step 2:- If you have an existing repository, then open that repository, otherwise, click on the "New" button to create a repository.

Step 3:- Enter the name and description(in which it is optional) for the repository. Then click on public or private Repository whatsoever you want to change yours to according to the requirement. Select the checkbox if you want to initialize the repository with a README

github image 2

Step 4:- Then, Open your Vs code or your terminal or which one you are using but like Gitbash is still advisable for window users

Step 5:- On Your Github account there will be some codes on it, which you will need to copy and paste onto your terminal

github image 3

Step 6:- The Code creating a new repository on the Command Line

echo "# pushing-project" >> README.mdgit initgit add README.mdgit commit -m "first commit"git branch -M maingit remote add origin https://github.com/SardiusJay/pushing-project.gitgit push -u origin main

Then, For an existing Repository

git remote add origin https://github.com/SardiusJay/pushing-project.gitgit branch -M maingit push -u origin main

Conclusion

Hope you enjoy it and now understand how to add a new repository to your GitHub account, Watch out for my next article very soon!!!! hope you learned something new. and in my next article I will be discussing how to push your project to your Github using Git(a Version control sytem)

Share with me your idea in the comment below about how this content has really helped you


Original Link: https://dev.to/sardiusjay/how-to-create-a-new-reposiorty-on-github-5c6j

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To