Ntege Ronald
3 min readMar 30, 2021

--

HOW A BEGINNER CAN SETUP A GITHUB REPOSITORY{PROJECT}

Before I go any further let me first define the term Github, Github is a provider of internet hosting for software development and version control using git.it offers the distributed version control and source code management functionality git plus its own features, to use Github properly you need to first instal git bash on your machine

First signup for a Github account

It's easy to signup up for a GitHub account just go to your browser type in github.com and then sign up for an account, after setting up your profile.

: create a repository

A repository is a location where all the files for a particular project are stored. each project has its own repository, and you can access it with a unique URL 1; in the upper-right corner of any page using the dropdown menu and select a new repository,

2; type a short memorable name for your repository,

3; optionally, add a description of your repository

4; live your repository public so that it can be visible to anyone on the internet

Create a local project using git bash

Go in search on your computer and open git bash after go on the next line and type mkdir myfile and it means directory and its not a git command, but a general navigation command and it can create a folder will have the project

next type; cd myfile

cd means changed directory and its also a navigation command and it takes us to the directory we just established

on another line type; git init

for this it's a git command that's why we started using git, it stands for initializing, it commands the computer to identify this directory as a local git repository, when you open up the folder it will not change because this new git repo is a hidden file inside repository that's dedicated

next type; touch Readme.txt

touch Readme.txt is not a git command and touch means creat and everything you write after that.

next type; git status

this command line is usually so passive up to the point it can reply with few lines of text similar

next;git commit-m

m flag indicates that the following text be read as a message

next type; git branch-M main.

Connect your local repository to your GitHub repository

now we need to inform git that a remote repository is there online .you add it to git because git dint knows our files up to when we used the git add command,

suppose we have a Github repository named myfile located at https://github.com/username/myfile.git. now we replace our username with our Github username and myfile should be replaced with the real title you named your first Github repository now we push our changes up to the GitHub remote repository, we type; git push-u origin main

Photo by Yancy Min on Unsplash

Then go back to Github and login once more, you will come to view that Github is tracking how many commits you have made today and then click on your repository it will have a unique Readme.txt file as built it into our local repository

conclusion

practice makes perfect as you do follow this medium story try to practice over and over in order to perfect yourself.

--

--