Managing Your Project With Subversion

Problem

You aren't using a version control system.

You want to track code changes in your Laravel project and aren't sure what to use.

Solution

Use Subversion.

Step 1 - Import an empty project

laravel:~$ cd myapp
laravel:~/myapp$ svn import --depth=empty . svn://myrepo/projects/myapp \
> -m "Initial import"

Step 2 - Check out the empty project into existing project

laravel:~/myapp$ svn checkout svn://myrepo/projects/myapp .

Step 3 - Delete unnessesary files

laravel:~/myapp$ rm .gitattributes
laravel:~/myapp$ rm .gitignore
laravel:~/myapp$ rm bootstrap/compiled.php
laravel:~/myapp$ rm app/storage/*/*

Step 4 - Ignore directory, add files

laravel:~/myapp$ svn propset svn:ignore vendor .
laravel:~/myapp$ svn update
laravel:~/myapp$ svn add a* b* c* C* p* r* s*
laravel:~/myapp$ svn propset svn:ignore compiled.php bootstrap/
laravel:~/myapp$ svn propset svn:ignore \* app/storage/cache/
laravel:~/myapp$ svn propset svn:ignore \* app/storage/logs/
laravel:~/myapp$ svn propset svn:ignore \* app/storage/meta/
laravel:~/myapp$ svn propset svn:ignore \* app/storage/sessions/
laravel:~/myapp$ svn propset svn:ignore \* app/storage/views/

Step 5 - Check everything in

laravel:~/myapp$ svn update
laravel:~/myapp$ svn commit -m "Initial import"

Discussion

This is just one way to do it.

There may be an easier ways for your project. Here's a few alternatives:

  • Create an empty subversion project to work with before creating your Laravel project.
  • Use a graphical interface to manage the project in subversion.
  • Import everything initially.

It's up to you.

A couple things to note ...

In Step 3

We deleted the files that Laravel will build automatically.

In Step 4

All those svn propset commands are to keep subversion from wanting to manage the vendor directory and contents of logs, cache, etc.

comments powered by Disqus
{"cc_re__cc_re__cc_by_sa_4_0": ["/script>\n  <noscript>\n    Please enable JavaScript to view the\n    <a href=\"http://disqus.com/?ref_noscript\">comments powered by Disqus.</a>\n  </noscript>\n  <a href=\"http://disqus.com\" class=\"dsq-brlink\">\n    comments powered by <span class=\"logo-disqus\">Disqus</span>\n  </a>\n\n    </div>\n  </div>\n  <footer id=\"colophon\" class=\"site-footer\" role=\"contentinfo\">\n    <div class=\"container\">\n\n      <div class=\"row\">\n        <div class=\"site-info col-md-6\">\n          <p class=\"text-muted\">\n            <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\">\n              <img alt=\"Creative Commons License\" style=\"border-width:0\"\n              src=\"http://i.creativecommons.org/l/by-sa/4.0/88x31.png\" />\n            </a>\n            <br>\n            <span xmlns:dct=\"http://purl.org/dc/terms/\" property=\"dct:title\">Laravel Recipes</span>\n            by <a xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://laravel-recipes.com\"\n              property=\"cc:attributionName\" rel=\"cc:attributionURL\">Chuck Heintzelman</a>\n            is licensed under a <a", "\">\n              <img alt=\"Creative Commons License\" style=\"border-width:0\"\n              src=\"http://i.creativecommons.org/l/by-sa/4.0/88x31.png\" />\n            </a>\n            <br>\n            <span xmlns:dct=\"http://purl.org/dc/terms/\" property=\"dct:title\">Laravel Recipes</span>\n            by <a xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://laravel-recipes.com\"\n              property=\"cc:attributionName\" rel=\"cc:attributionURL\">Chuck Heintzelman</a>\n            is licensed under a <a rel=\"license\"\n            href=\"http://creativecommons.org/licenses/by-sa/4.0/\">Creative Commons\n            Attribution-ShareAlike 4.0 International License</a>.\n          </p>\n        </div><!-- .site-info -->\n\n        <div class=\"site-social text-right col-md-6\">\n          <ul class=\"list-inline hidden-print\">\n            <li>\n              <a href=\"https://www.facebook.com/chuck.heintzelman\"\n                class=\"btn btn-social btn-facebook\"\n                title=\"Facebook\">\n                <i class=\"fa fa-facebook fa-fw\"></i>\n              </a>\n            </li>\n     "]}