简体   繁体   中英

How to pull subfolder from git repo during capistrano deploy?

In my git repo, there is a folder that has the web related files I need to deploy.

So I want to deploy from the master branch, but from a subfolder of the repository, is this possible?

You'll have to clone the entire repository during your deploy and then move the files to where you want them to be deployed, or clone to a parent directory so that the files are in place. For example, the following command will clone an entire git repository into the www folder, so if your subdirectory should be in www/path/to/directory your git repository should have an identical path/to/directory in it:

git clone git@github.com:username/app.git www

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM