Skip to content

Instantly share code, notes, and snippets.

@Xsmael
Last active November 1, 2021 16:27
Show Gist options
  • Save Xsmael/c65b32fd171523b4b9bc5cf430ac532c to your computer and use it in GitHub Desktop.
Save Xsmael/c65b32fd171523b4b9bc5cf430ac532c to your computer and use it in GitHub Desktop.
Laravel & Git help file

Merging another developer's branch into mine


Let's say you are currently working on branch feature/feature_a and you want to merge the changes made in another branch called feature/feature_b to feature/feature_a. The following commands should do the trick:

git checkout feature/feature_b

git pull

git checkout feature/feature_a

git merge feature/feature_b

Run laravel project locally from clone

Windows users:

Download wamp: http://www.wampserver.com/en/ Download and extract cmder mini: https://github.com/cmderdev/cmder/releases/download/v1.1.4.1/cmder_mini.zip Update windows environment variable path to point to your php install folder (inside wamp installation dir) (here is how you can do this http://stackoverflow.com/questions/17727436/how-to-properly-set-php-environment-variable-to-run-commands-in-git-bash) cmder will be refered as console

Mac Os, Ubuntu and windows users continue here:

Create a database locally named homestead utf8_general_ci Download composer https://getcomposer.org/download/ Pull Laravel/php project from git provider. Rename .env.example file to .envinside your project root and fill the database information. (windows wont let you do it, so you have to open your console cd your project root directory and run mv .env.example .env ) Open the console and cd your project root directory Run composer install or php composer.phar install

Run php artisan key:generate

Run php artisan migrate

Run php artisan db:seed to run seeders, if any.

Run php artisan serve

You can now access your project at localhost:8000 :)

If for some reason your project stop working do these: composer install php artisan migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment