Guest User

Untitled

a guest
Apr 13th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. [QUOTE=Thor187;17424834]All jokes and taking a p1ss aside;
  2.  
  3. Are one of you actually able to provide an answer?
  4.  
  5. I have two very clear questions yet there is a lot of talk and talk and my years beat your years ramble yet none of you manged to answer even the easier of questions (number 2).
  6.  
  7. Try to do this
  8.  
  9. Question 1
  10.  
  11. A
  12.  
  13. Question 2
  14.  
  15. A[/QUOTE]
  16.  
  17. I wrote this about 2 days ago and it got swallowed by the system.
  18. It's basically what has been repeated here, 2, 3, 4 times already.
  19.  
  20. Answer 1:
  21.  
  22. I login to my bitbucket and create a repo.
  23. I use the CLI and setup the repo on my local machine (follow the instructions from bitbucket after you creat your repo - it tells you what to do if it's a fresh project or if you already have files).
  24. When I start PHPStorm and File -> open the directory then it detects the git setup and asks if I want to integrate it into my project.
  25. Automagically, everything is done and if I feel like it I can do all my git stuff from within PHPStorm.
  26. Do I? No, I use the CLI because it's THAT MUCH BETTER.
  27.  
  28. Answer 2:
  29. For each project I have (99% web related) I have a directory structure similar to:
  30. ~/projects/project1/
  31. ~/projects/project1/site/ - where the code goes
  32. ~/projects/project1/resources/ - files I receive from the client
  33. ~/projects/project1/db/ - db creation scripts, backups, etc
  34. ~/projects/project1/docs/ - any documentation I have/create
  35.  
  36. ~/projects/project2/
  37. ~/projects/project2/site/
  38. ~/projects/project2/resources/
  39. ~/projects/project2/db/
  40. ~/projects/project2/docs/
  41.  
  42. All this will be in git.
  43.  
  44. I have a full local installation of apache/nginx/postgres/mysql and not running WAMP/LAMP/etc.
  45.  
  46. I create a virtualhost for each project along with hostname/domainname eg:
  47. project1.local
  48. project2.local
  49.  
  50. Each virtualhost in my apache/nginx config has the webroot set to ~/projects/project1/site/
  51.  
  52. Adding:
  53. 127.0.0.1 project1.local
  54. to my /etc/hosts file makes it resolvable and I can view the site in my browser by going to http://project1.local/
  55. I update code, browser refresh, see updates.
Advertisement
Add Comment
Please, Sign In to add comment