berack kaunda
berack kaunda
Kickstart Your GitHub Journey With These Easy Steps

Kickstart Your GitHub Journey With These Easy Steps

Berack Kaunda's photo
Berack Kaunda
ยทOct 14, 2021ยท

3 min read

PermalinkWhat is GitHub?

GitHub is a we-based platform used for project version control and code hosting.

GitHub uses Git, a widely-used version control system.

GitLab and Bitbucket are also similar tools.

PermalinkRequirements

Before we start the tutorial here are some of the prerequisites:

  1. Very basic knowledge of Git
  2. Git installed in your system
  3. A GitHub account

With a ready GitHub account, we can now begin.

PermalinkGetting Started

To keep things really simple, you can use one of your projects, if none you can create a simple HTML page.

For the rest of the tutorial, we will be using the Terminal to run commands.

To kickstart, in the terminal navigate to your project root directory.

PermalinkInitialize Git

In order to store our locally created file/folder to GitHub, the first step is to initialize Git.

Run:

git init

Running this command turns your directory into a new Git Repository.

PermalinkAddition of Files

This process is known as staging

In staging we mark the repository so that we can track any changes made to our local folder since the last commit.

Run:

git add .

All the files in the repository will be marked, ignoring the .gitignore file.

PermalinkCommitting files

We are now ready for our first commit on our already marked files.

A commit is a snapshot of the current state of the files, it will prepare the tracked changes for pushing to GitHub.

Run:

git commit -m "Add any message"

The commit message is just a friendly reminder about what changes are in the commit.

PermalinkPushing to GitHub

There are two parts of this process.

First and foremost we need to create a repository, here is where we push our local commits to the remote repository.

The last part is pushing our project

PermalinkCreate your first repository

Log into your GitHub account, at the top right corner, click the plus sign icon then select New Repository.

2020-10-08-new-repo.png

Follow the instructions and Create Repository.

2020-10-08-create-repo.png

Stay on the Create Repository page to finish the next step.

PermalinkPushing your project to GitHub

On the Create Repository page, navigate to "push an existing repository from the command line" section, copy the three commands provided and paste them in your terminal, press enter to execute them

2020-10-08-existing-repo.png

git remote add origin <link>
git branch -M main
git push -u origin main

After running these commands, you can reload the browser page to see the changes.

Your project is now listed in the online repository.

If this is your first one, congratulations! You have reached a programming milestone.๐Ÿฅณ๐Ÿฅณ๐Ÿฅณ

PermalinkMaking Updates to the Repository

You can make updates to the online repository by running the following commands.

git add .
git commit -m "Commit message"
git push -u

Replace the message with a descriptive of your own.

Happy Coding!!!!! ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

GitGitHubWeb Developmentnewbie
 
Share this

More articles

Berack Kaunda's photo
Berack Kaunda
Offshore Mobile App Development โ€“ What to Expect?

Offshore Mobile App Development โ€“ What to Expect?

Mobile applications have become a vital tool for businesses to connect with their customers and streโ€ฆ

Berack Kaunda's photo
Berack Kaunda
How Hiring an Android App Developer is Best for Your Business

How Hiring an Android App Developer is Best for Your Business

In today's digital landscape, mobile apps have become a vital tool for businesses to connect with thโ€ฆ

Berack Kaunda's photo
Berack Kaunda
Best Mobile App Development Tips for Enterprises

Best Mobile App Development Tips for Enterprises

Mobile app development has become increasingly vital for enterprises. With the widespread use of smaโ€ฆ

berack kaunda

ยฉ2025 berack kaunda

ArchiveยทPrivacy policyยทTerms

Powered by Hashnode - Build your developer hub.

Start your blogCreate docs

2020-10-08-create-repo.png
2020-10-08-new-repo.png
2020-10-08-existing-repo.png
Blog author

Follow berack kaunda's journey

By following, you'll have instant access to our new posts in your feed.

Continue with GoogleMore options