Adding A File From Local to Git Hub

Adding A File From Local to Git Hub

Adding A File From Local to Git Hub

In this article . I will create a new Repository at GitHub and push the Local Repository file  Code from my Laptop to GitHub.

The Actual Web App Here

The Codes Are Here

Step 1

Open Git Bash , navigate to your master folder using the’cd’  Command , then check the Master File using ‘git status’

Git Bash
Git Bash

 

Step 2

Create a New Repository on GitHub

Name your Repository and Input  the Details of your Repository

Name your Repository
Name your Repository

When Done Click Create…

Step 3

Linking Local Repository to GitHub

I am going to Add 2 files ( HTML , JavaScript’s File ) to the Remote GitHub Repository

Click Code and Copy the Github Link

copy github link
copy github link

 

Go back to Git bash

type

git remote add origin  < remote URL>

Set the New Remote Repository

git remote -v

Step 4

I am going to Add 2 files ( HTML , JavaScript’s File ) to the Remote GitHub Repository

Push Local File to Remote Repository

git commit -m “message”

Commit the 2 New Files

Push your File from local to remote repository Github

type  :-> git push -u origin master

Step 5

Check the File at your Remote Depository at GitHub

 

 

 

 

 

 

Leave a Reply

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

five + 13 =