Connecting the Laravel Project on GitHub.

So today we’ll go through how to connect our github account to our project. In short we’ll learn how to use git to push our project and to push/pull changes. So firstly we need a laravel project.

STEP 1: Create a laravel project.

Follow above link to see how a project is created in laravel.

STEP 2: Install Git

Follow the above link to download git on your machine.

STEP 3: Create an account on Github.

Make an account on the above-specified link.

STEP 4: Make a repository on Github.

making a simple repo on github
repository after creating

STEP 5: Pushing over GitHub

So now as we have made the repository we will now push the project on git. Follow the below steps to executing it.

1. Open git bash in laravel project directory

open git bash

2. In git bash enter the following command.

We will first initialize the project.

git init

Next Add the file to git.

git add .

Next Commit the changes by suitable commit message.

git commit -m 'Added REST Api'

Next add the remote origin where the project is to be pushed.

git remote add origin

Last but not the least, push it to github.

git push -u -f origin master

That its, and the repo is thus added to your git account. You can now clone the repo anywhere around the world using git.

repo on git

Written by


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store