How to install github

Home / How to install github

In this artice we learn how to install github. As we know that Git is an open-source distributed version control software and we use git for versioning our software.

Using git we can upload our code on a central location called git repository. To upload our code on git we require below tools:

  1. A GitHub account
  2. Git installed on your window machine

How to create GitHub account

To create GitHub account you have to follow the below steps:

  1. Go to the GitHub website URL ( open Github ).
  2. Click on SignUp.
  3. Fill the form and click on Create account.
  4. Now you will get an email from GitHub click on the verify link.
How to install github
how to install github on windows
How to install github

How to install github on windows

To install Git on your window system you have to follow the below steps:

  1. Go to the git website using URL ( open git )
  2. Click on download.
  3. Now your download will start.
  4. Go to download folder and open the .exe file.
  5. You have successfully installed the git.
how to install github on windows
github on window

After this click on Next on every window. Do not change the default setting just click on Next on every window.

After completing all steps you will get a window click on Launch Git Bash and after that click on finish.

window github
github on window

Now just check the version of the git using below command.

git --version

So congrats till now you have successfully setup both the steps. You have created your account on GitHub and you have also installed git on your window machine.

Till this point we have complete git setup. Now lets see how to upload your file from your computer system to your GitHub repository through the git commands.

Lets see what we are going to do using below steps:

  1. Create a folder on our system.
  2. A .txt file and write some data in that file.
  3. Create a GitHub repository.
  4. Commit our .txt file means give some message to your commit so we can recognizes our version using this message.
  5. Link GitHub repository URL to our folder.
  6. Push our .txt file to the GitHub repository.

To follow above steps you must have some basic knowledge about the below Linux commands.

  1. mkdir
  2. cd
  3. touch
  4. vim

We use mkdir command for creating the folder. In this example we create a folder with name myGitHubFolder.

 mkdir myGitHubFolder

cd command is using for go inside the directory or folder of the given path.

 cd myGitHubFolder/

touch command is using for creating the files. In our case we create a .txt file using this touch command.

touch myGitFile.txt

vim command is using to open the .txt file and use to write some text inside that file.

vim myGitFile.txt

After using the above command a window display. After the press i from your keybord.

i is used for insert. After that write some text in that file and save. For saving data we have to press the below keyword.

esc : wq!

and press enter after typing above keywords.


Till now we have created a Folder with name myGitHubFolder and after that we create a .txt file inside this folder with name myGitFile.txt and put some text inside that.

Now we have to create a GitHub repository and for that we have to Sign in to our GitHub account and create the new repository.

how to install github in windows
how to install github in windows
how to install github in windows
how to install github in windows

You have successfully created a GitHub repository and after creating that you will see some commands display on that repository .

git init
git add
git commit -m "first commit"
git branch -M main
git remote add origin
git push -u origin main

Now open you git bash terminal and follow the below steps:

  1. Initialize git using git init command
  2. Add your .txt file using git add . command.
how to install github in windows

Now add GitHub user and GitHub repository URL to git bash.

github on window
how to install github in windows
how to install github in windows
how to install github in windows

You may also like:

Spring boot security using JWT ( JSON WEB TOKENS ).

spring batch example

Help Others, Please Share

About Author

Leave a Reply

Your email address will not be published. Required fields are marked *