How to Add an Existing Project from Local Directory to Github

Follow the steps below to add an existing project from local directory to Github.

First You will need a Github account username and password. If you do not have a github account yet, then create one.

Next, create the repository in Github where you will be pushing your project to.

Navigate to your local directory where project files are located and open Git Bash there.

Run git init to initialize your local directory as a Git repository.

git init

Run git add to add the files to local repository. This will stage all the files in local repository for the initial commit.

git add .

Commit the files

git commit -m "first commit"

Open your Github repository in a browser. Find the HTTPS Url of this repository.

Paste this url with the following command in Git Bash.

git remote add aegis_bootstrap_theme https://github.com/webdesignvista/aegis-bootstrap-theme.git

In the example above aegis_bootstrap_theme is the name given to local repository, and the URL at the end it the HTTPS Url of the remote github repository. These values will be different for your project.

Push the local changes (master branch) to remote repository

git push aegis_bootstrap_theme master

Check your github repository, all the project folders and files should be there now.