I
I
Ivan Ivanov2016-05-19 16:58:59
PHP
Ivan Ivanov, 2016-05-19 16:58:59

How to make git and denwer friends?

I'm developing the site myself using denwer on windows 7. How to make git and denwer friends and make it convenient to update the site on a server with debian? I must say right away that I just started learning git. I made a repository in the site folder (i.e. in the site folder (let's call it site) a .git folder was formed, there was also a www folder with site files). But now, if I put another file in the site folder, then this file will be included in the repository, but I don’t need this, I need only files from the site / www folder to be dumped into the repository. If the repository is made in the site / www folder, then it will be inconvenient to upload files to the server via ftp, it will be possible to accidentally upload the .git folder to the server. In general, what is the best way to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DenJel, 2016-05-19
@romalu

create a .gitignore file at the root, write a rule there: ignore everything except www. Something like:

**
!www

Google glob gitignore

F
Fat Lorrie, 2016-05-19
@Free_ze

Write a simple deployment script that cleans up the site root folder and recopies the current version of the site from the repository.
Profit: separate flies from cutlets and automate the process.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question