{"id":23276190,"url":"https://github.com/mikamai/cap-git-deploy","last_synced_at":"2025-10-18T03:25:59.053Z","repository":{"id":879155,"uuid":"623207","full_name":"mikamai/cap-git-deploy","owner":"mikamai","description":"Capistrano GIT deployment","archived":false,"fork":false,"pushed_at":"2014-02-13T12:11:22.000Z","size":252,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-04-14T19:56:48.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikamai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-04-22T10:22:59.000Z","updated_at":"2017-01-06T21:10:21.000Z","dependencies_parsed_at":"2022-07-05T20:29:50.735Z","dependency_job_id":null,"html_url":"https://github.com/mikamai/cap-git-deploy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikamai%2Fcap-git-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikamai%2Fcap-git-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikamai%2Fcap-git-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikamai%2Fcap-git-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikamai","download_url":"https://codeload.github.com/mikamai/cap-git-deploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230504355,"owners_count":18236576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T21:29:36.476Z","updated_at":"2025-10-18T03:25:54.010Z","avatar_url":"https://github.com/mikamai.png","language":"Ruby","readme":"# Installation\n\n```bash\n    gem install cap-git-deploy\n```\n\nor inside your Gemfile:\n\n```ruby\n    group :development do\n      gem 'cap-git-deploy'\n    end\n```\n\n# How to use\n\ncap-git-deploy disables the use of the symlinks for version control in favor of a tag-style mechanism with git: every deploy is marked with a git tag. A rollback is a checkout to a tag.\n\nThe following is a sample recipe that uses git-deploy as deployment procedure:\n\n```ruby\n    require 'cap-git-deploy'\n\n    set :repository, 'git@my-host.com:my-app.git'\n    set :deploy_to, '/var/apps/my-app'\n    role :app, 'my-host.com'\n    role :web, 'my-host.com'\n    role :db, 'my-host.com'\n```\n\nIn addition, cap-git-deploy stores some deploy info inside a revision file (called REVISION by default) on the remote host.\nAfter each deploy the commit sha, the branch name, the user name and the current date are stored inside this file.\nTo show the deploy infos you can launch the revision:get task:\n\n```bash\n    cap revision:get\n```\n\n## Note: Current Branch\n\nBy default, your current branch will be deployed.\nHowever, when working with staging environments, usually you want to deploy a particular branch unless specified. In this case insert the following in your deploy.rb file:\n\n```ruby\n    set :branch, ENV['branch'] || 'master'\n```\n\nIn this way, 'cap deploy' will deploy the 'master' branch, instead 'cap deploy branch=foo' will deploy the branch 'foo'.\n\nFor production environments **you should** use something like the following code:\n\n```ruby\n    set :branch, 'master'\n```\n\n## Note: Setup\n\nTo setup your environment, when your recipes are ready, type the following command from your rails app:\n\n```bash\n    cap deploy:setup\n```\n\nThis will setup your git repository on the remote host.\n\n## Other Stuff: Logs\n\nTail the current environment log with the \"logs\" task. So the following command will do a \"tail -F\" on \"log/beta.log\"\n\n```bash\n    cap beta logs\n````\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikamai%2Fcap-git-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikamai%2Fcap-git-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikamai%2Fcap-git-deploy/lists"}