Great Resource : http://laravel-recipes.com/recipes/31/managing-your-project-with-git
- Within the project folder, Setup new git repository as git :: git init
- Add new files to get by :: git add . (When using init, most of the directories will be added automatically.)
- Add remote repository link by :: git remote add origin https://github.com/user/gitname.git
- Commit new files :: git commit -m “Initial commit, pushing first upload to git”
- Pushing changes to the github repository :: git push origin master
Making changes
- Add changes to the local git :: git add file.php or all files git add .
- Commit the changes :: git commit -m “New changes”
- Push to github :: git push origin master
Getting new changes
- Load new changes from master at github :: git fetch
- Load new changes from master on local host is :: get pull
- Merge new changes to your local repository :: git merge origin/master
- OR you can do both of these at the same time :: git pull origin master
Undo a change
Adding to other computer or server
Cpanel hosting with a2hosting :: https://www.a2hosting.com/kb/developer-corner/php/installing-composer
Run the :: composer install command in the directory
Setup the right PHP we frustrating. The cpanel update”r” wouldn’t update so I had to add the info to the htaccess page: https://www.a2hosting.com/kb/developer-corner/php/using-alternate-php-versions#Method-1.3A-Use-cPanel
<IfModule mod_suphp.c>
AddHandler application/x-httpd-php-5.5.0 .php
</IfModule>
Setup artisan on shared host:
https://www.a2hosting.com/kb/installable-applications/manual-installations/laravel1
Run the artisan key:generate command… didn’t work on the shared host, so I manually added on. int eh config/app.php file.