How to connect a Laravel project on GitHub

Tram Ho

Today I will show you how to use git to push a laravel project onto github
Start.

Step 1: Create a laravel project.

https://medium.com/@larahelp/restful-api-in-laravel-5c1389c58ca0
You go to the link and read to create project laravel.

Step 2: Install Git

https://git-scm.com/downloads
You go to the link above to download and install git.

Step 3: Create an account on Github.

https://github.com
You go to the link above to create a github account

Step 4: Create a repository on Github.

Step 5: Push to GitHub

Now that we have created the repository, we will now push the project to git. Follow the steps below to do it:

1. Open git bash in laravel project directory

2. In git bash, enter the following command

Initialize the project first:

Add files to git:

Commit changes by message

Add the remote origin where the project will be pushed

Last but not least, push it into the github

And the repository is added to your git account. Now you can copy the repository anywhere with git

Good luck
The article is brief and translated from: https://medium.com/@larahelp/connecting-the-laravel-project-on-github-73acf55bbd63

Share the news now

Source : Viblo