Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 1, 2022 03:26 am GMT

Host static website for free in less than 10 minutes.

What is github?

GitHub, Inc. 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 of Git, plus its own features.

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.

Prerequisite.

  • Github Account.
  • Git installed and configured with your github account.

Getting started

My folder structure

Image description

Create repository in github.

  • Create a new repository.

Image description

  • Configure repository details.

Make repository name shorter that will result to short URL.

Image description

The repository has to be public unless you are a pro member in github. I have access to create private repository as I have pro member tag on my github profile.

  • Commit the files

Start git bash and add these lines of code one by one.

  • git init
  • git add .
  • git commit -m 'my first commit'
  • git remote add origin https://github.com/{username}/{repository name}.git
  • git push -u origin master
  • Refresh the github repository page and you will see all files.

  • Configure github pages.

  • Go to settings.

Image description

  • Go to pages.

Image description

  • Select branch and save it.

Image description

Image description

You will get redirected

  • Your work is done

Refresh the page and you will see the deployed link.

Image description


Original Link: https://dev.to/vedantjain03/host-static-website-for-free-in-less-than-10-minutes-27j1

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