7/27/2023 0 Comments Installer maker for githubWhen we run composer, it checks the composer.json file which is submitted to the github repo and lists all of the composer (PHP) packages that your repo requires. This is what actually installs Laravel itself, among other necessary packages to get started. Whenever you clone a new Laravel project you must now install all of the project dependencies. If you don’t understand anything about git or branches than just use the code snippet exactly as it reads here and it will work just fine. This allows you to work without ruining the final code in your project (you can always move over to the master branch for the final code that I submitted). This is going to checkout the start tag and put it on a fresh new branch with the name you provide here. You can change the last word (“tutorial” in this example) to be the name of the working branch you prefer. These are all git terms that you will become familiar with as you use git more and more. We will use the following code snippet to “checkout” the start point which I marked with a “tag”. So we need to use another git technique called “checkout” to checkout the beginning of the project so you have the same starting code that I have in the video, allowing you to follow along with me in the upcoming videos. Of course you want to start at the beginning so you can learn how to do that all on your own. Keep in mind that this step is optional because not all git repos will have a start tag, but most the tutorials that I create for you will have a start tag. If you are following another tutorial from DevMarketer, then I usually create a tag with git, that marks the beginning of the project so you can follow along with the tutorials on this site and my YouTube channel. : Checkout the “Start” tag so you have a fresh install of the project (and not the final files)īy default you have cloned the entire git repo, which will include the final project. (Of course substitute “projectName” in the command above, with the name of the folder you created in the previous step). So remember to type cd projectName to move your terminal working location to the project file we just barely created. You will need to be inside that project file to enter all of the rest of the commands in this tutorial. Once this runs, you will have a copy of the project on your computer. This will reveal a url that you will replace in the part of the snippet above. To get the link to the repo, just visit the github page and click on the green “clone or download” button on the right hand side. You can change the name of this folder it creates, by changing the last part of the code snippet below to match the name you want your folder to be called. In my case I like all my projects to be a folder called sites/, so that is where I run the following command, which will pull the project from github and create a copy of it on my local computer at the sites directory inside another folder called “projectName”. Note: Make sure you have git installed locally on your computer first.įind a location on your computer where you want to store the project. If the project is hosted on github, we can use git on your local computer to clone it from github onto your local computer. Clone GitHub repo for this project locally So grab your favorite repo and let’s clone it and get it working on your local system. In addition to cloning the repo, this means we need to setup the database, the env file, the encryption key, and more. This tutorial will show you the standard things you need to do to clone a github repo onto your local computer and get it setup to start working on your system. Or maybe you are following another DevMarketer project and are having trouble getting started from one of the github repos. So you found a cool Laravel project off and want to use it locally to play around with it, or learn from it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |