0

I've got Node.js and Git setup on a server. What I want is to be able to commit to the Git server from my computer, and the files on the server change accordingly.

However, I can't get my head around how to get Git to work. If I use a non-bare repo, I can get files to sync between anyone pulling/committing to the server, but the files on the Git server itself don't update - so I can't run Node as the server files aren't there.

If I use a bare repo, the files on the Git server are up to date, but AFAIK you can't commit to the current branch if it's checked out on the server, which I need to do to access the files server side, so that isn't working either.

Is there anyway to do this? :S

Magnus Bäck
  • 11,381
  • 3
  • 47
  • 59
Jordan Thomas
  • 31
  • 1
  • 4
  • Maybe you can make some kind of job that polls whether there is a change, or fires on a change and basically pulls changes to wherever you want the most current files to be. – GolezTrol May 28 '15 at 21:07
  • https://help.github.com/articles/about-webhooks/ & http://stackoverflow.com/questions/9132144/how-can-i-automatically-deploy-my-app-after-a-git-push-github-and-node-js – ecarrizo May 28 '15 at 21:10

0 Answers0