0

Firstly, when it comes to git i'm a bit of a newbie.

I have two website one is used for development the other is the live site. I am just about to move all the files over to git, (and github) as I have been using SVN but think git (after a few weeks of playing) will suit the project better going forward.

What I'm trying to understand is how to get the best workflow for me, having the files uploaded onto remote servers. The sandbox version of the site currently lives locally and also uploaded to the sandbox remote site, any testing is done on here, and once we are happy we move it across to the main site Via checking in any changes flipping over to live site files and updating file then uploading.

I now intend to have the main 'Master' branch and have a 'sandbox' branch version off that. This would give me the option to create new branches for small bugs, merging them to sandbox when done and testing.

In my old way of working as the files were stored in two different places locally (had checked out two version from SVN repository) I could jump into Coda and ftp the files up to the server when ready.

I'm now guessing pushing to remote would be a better option as ftp-ing with the one repository would cause a few headaches?

I'm using Tower that is really helping my workflow, but stuck on how to get the files online. Any help or if my question doesn't make sense please shout...

jimbo
  • 1,018
  • 4
  • 18
  • 34

1 Answers1

-1

i suggest you dev locally, push to your remote (e.g. github), ssh to your live server, then git pull the changes from github to the live site.

recently i have been using a 3 step process:

  • dev locally in a feature branch. once ready merge into a CI branch.
  • test on CI server. jenkins sees the new commit to the CI branch (github post commit hook), pulls down the changes and auto builds it on the test server and runs all my unit tests.
  • if all tests pass, jenkins builds the docs and commits them to the docs branch. merges CI into master and pushes everything the remote server. github sees this new commit to master (post commit hook again) and issues a command to the live server to pull the new changes. if the unit test fail it emails me and quits.

do a bit of final live site testing and repeat.

xero
  • 4,077
  • 22
  • 39
  • Thanks for the quick reply, not sure I fully understand but will research into what your saying. Thanks – jimbo Aug 02 '13 at 16:12
  • take a look at: https://help.github.com/articles/post-receive-hooks and http://jenkins-ci.org hope that helps! – xero Aug 02 '13 at 18:06