Set apache htdocs / subfolder as git working directory

I was just starting to learn Git, and I'm a little stuck. We use Github to conduct our "stable" project, but I am having problems working with repo.

I want to know whether it is possible to use local web servers htdocs/[projectname]as a working directory - this way I could clone the repo from github, work with it on a local server (so this works, since the application should allow me to check everything that I am writing correctly), and then the stage β†’ commit from there.

I am working on a Mac using the MAMP framework. The application is a PHP based CMS. We keep it on Github in private storage. Currently, Git uses it /Users/Ben/Core-CMSas a working directory, but it is very difficult to verify - it would be much better if the working directory was inside apache htdocs dir

I bought Pro Git, but it’s really hard for me to learn the concepts of Git - I deliberately avoided using the graphical interface, as I would like to properly learn the internal workings of Git before starting to β€œcheat”! ”

+5
source share
2 answers

htdocs, /Users/Ben/Core-CMS htdocs/Core-CMS http://localhost/Core-CMS.

htdocs, /Users/Ben/web, apache . apache, /Users/Ben/web , apache conf:

DocumentRoot /path/to/htdocs

:

DodumentRoot /Users/Ben/web
+5

. .

:

git clone REPO_URL NAME_OF_DIR_TO_CLONE_TO

.

, git, .

ssh-, github git, ( , ).

, , , github.

- - DocumentRoot.

, ;)

+1

All Articles