- I put a reference to .../myproj/current in my local .git/config file:
- [remote "servername"]
url = ssh://user@appserver/project/path/current
fetch = +refs/heads/deploy:refs/remotes/deployed/servername - Run "git fetch", and I have a remote ref that points to the code currently on the app server regardless of the success of any other code that may or may not have run.
Monday, May 05, 2008
Tracking rails code deployed with git
With git and multiple remote repositories I decided that it would be really nice if I had a branch ref in my local repository that points at the currently deployed version of my code. You could do capistrano tasks and update a branch in the central repository when you deploy code, but I found an easier way that works for my small project. I only have one app server, and I use the remote_cache strategy so this option is easy.
Subscribe to:
Post Comments (Atom)
1 comment:
Good post.
Post a Comment