vendredi 30 janvier 2015

Git workflow for website

This already works:


I'm administrating a site via local git commits that I push to a bare remote git repository.


There is a post-receive hook which does GIT_WORK_TREE=/web git checkout -f to checkout the files to the running site.


What I would like to add to this workflow:



  • Changes via SFTP to the running site should be automatically committed and pushed (or merged)

  • Changes to files in specific folder (in this case folders with pictures and statistics) should be synced between the local repository and the working directory but not be "tracked" by Git (I don't need several versions of these files, only the latest ones and only locally and on the life site)

  • I only want the branch "Master" to be checked out to the life site. If I work on e.g. the "Dev" branch I don't want anything changed on the life site


I don't know if and how this is possible. I already looked at gitwatch and this site but I don't know if this is what I need and if there could be an even simpler way.


Also I don't know how to accomplish the other two ideas.


Any opinion, help or point in the right direction is greatly appreciated!





Aucun commentaire:

Enregistrer un commentaire