Today I will show you how to use git to push a laravel project onto github
Step 1: Create a laravel project.
You go to the link and read to create project laravel.
Step 2: Install Git
You go to the link above to download and install git.
Step 3: Create an account on Github.
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:
git add .
Commit changes by message
git commit -m 'Added REST Api'
Add the remote origin where the project will be pushed
git remote add origin https://github.com:larahelp/RestApi.git
Last but not least, push it into the github
git push -u -f origin master
And the repository is added to your git account. Now you can copy the repository anywhere with git
The article is brief and translated from: https://medium.com/@larahelp/connecting-the-laravel-project-on-github-73acf55bbd63