dan_0
dan_0

Reputation: 609

Why does my Capistrano Deployment point to an old Commit?

I finalized my last work on a git branch and merged it to the branch for my staging environment. But after my Capistrano Deployment Script finished i rubbed my eyes, because although my changes are pushed to Github my last Commit was completely ignored. They point is that even the remote branch points to the real last commit, but that is not recognised by capistrano for some reasons. Any Ideas?

Upvotes: 2

Views: 240

Answers (2)

dan_0
dan_0

Reputation: 609

I found the Problem. There was a bad entry in the hosts file which leads to that strange behavior. Thank you for your efforts.

Upvotes: 0

Matt Brictson
Matt Brictson

Reputation: 11082

Capistrano 3 maintains a mirror of your Git repo on the server. It is stored alongside the current, releases, and shared directories in a directory called repo. Usually that means it is here:

/var/www/my_app_name/repo

If you are absolutely sure that the remote is up to date and yet Capistrano is not seeing it, then perhaps there is something wrong with this cached repo.

Try deleting the repo directory (or move it to a backup location) and deploying again. Capistrano will recreate it and hopefully pick up your new commits.

Upvotes: 1

Related Questions