Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [QUOTE=Thor187;17424834]All jokes and taking a p1ss aside;
- Are one of you actually able to provide an answer?
- 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).
- Try to do this
- Question 1
- A
- Question 2
- A[/QUOTE]
- I wrote this about 2 days ago and it got swallowed by the system.
- It's basically what has been repeated here, 2, 3, 4 times already.
- Answer 1:
- I login to my bitbucket and create a repo.
- 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).
- 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.
- Automagically, everything is done and if I feel like it I can do all my git stuff from within PHPStorm.
- Do I? No, I use the CLI because it's THAT MUCH BETTER.
- Answer 2:
- For each project I have (99% web related) I have a directory structure similar to:
- ~/projects/project1/
- ~/projects/project1/site/ - where the code goes
- ~/projects/project1/resources/ - files I receive from the client
- ~/projects/project1/db/ - db creation scripts, backups, etc
- ~/projects/project1/docs/ - any documentation I have/create
- ~/projects/project2/
- ~/projects/project2/site/
- ~/projects/project2/resources/
- ~/projects/project2/db/
- ~/projects/project2/docs/
- All this will be in git.
- I have a full local installation of apache/nginx/postgres/mysql and not running WAMP/LAMP/etc.
- I create a virtualhost for each project along with hostname/domainname eg:
- project1.local
- project2.local
- Each virtualhost in my apache/nginx config has the webroot set to ~/projects/project1/site/
- Adding:
- 127.0.0.1 project1.local
- to my /etc/hosts file makes it resolvable and I can view the site in my browser by going to http://project1.local/
- I update code, browser refresh, see updates.
Advertisement
Add Comment
Please, Sign In to add comment