I’ve been using GitLab CI more and more to replace the traditional Filezilla method. When you use git-FTP with Gitlab, all the process of transfer of files will be automatic. You don't need to frequently move the files to your server manually.Getting startedTo start using GitLab CI you have to create a .gitlab-ci.yml file in the root directory of your project. This file tells Git...
There are times when you might want to use git to zip files. I am a WordPress Developer so below codes are taken from one of my projects.
git archive --format zip HEAD:wp-content/themes/travelers-blog > travelers-blog.zip
The above code will search the folders
wp-content/themes/travelers-blog and put all the files of
git archive --format=zip --prefix=travelers-blog/ HEAD:wp-content/themes/travelers-blog > travelers-blog.zip
--prefix=travelers-blog/ will create
travelers-blog folder inside the zip file and put all the files inside that parent folder.