1 .TH GIT\-FTP 1 18/10/2011 HEAD "Git Manual"
3 git-ftp \- Quick and efficient publishing of Git repositories over FTP
9 \fIgit ftp\fR [(\-\-force | \-f)] [(\-\-quiet | \-q)]
10 [(\-\-revision | \-r) <commit>] [(\-\-commit | \-c) <commit>]
11 [(\-\-branch | \-b) <branch>] [(\-\-section | \-s) <section>]
18 Some web hosts only give you FTP access to the hosting space, but you would
19 still like to use Git to version the contents of your directory. You could
20 upload a full tarball of your website every time you update, but that's
21 wasteful. \fIgit ftp\fR only uploads the files that changed.
29 Force the reupload of all files instead of just the changed ones\&.
35 Display only errors and warnings\&.
39 \-r <commit>, \-\-revision=<commit>
41 The SHA of the current revision is stored in \fIgit-rev.txt\fR on the server.
42 Use this revision instead of the server stored one, to determine which files
47 \-c <commit>, \-\-commit=<commit>
49 Upload this commit instead of HEAD or the tip of the selected branch\&.
53 \-b <branch>, \-\-branch=<branch>
55 Use this branch instead of the active one\&.
59 \-s <section>, \-\-section=<section>
61 Use this section of the ftpdata file instead of the active branch name\&.
66 You can place FTP credentials in \fI.git/ftpdata\fR, as such:
74 password=s00perP4zzw0rd
75 hostname=ftp.hostname.com
81 password=s00perP4zzw0rd
82 hostname=ftp.hostname.com
83 remotepath=/htdocs/staging
90 Each section corresponds to a Git branch. If you don't create the configuration
91 file, \fIgit ftp\fR will interactively prompt you.
93 FTP SSL support needs Python 2.7 or later.
96 .SH "EXCLUDING FILES FROM UPLOADING"
98 Similarly to \fI.gitignore\fR you can exclude files from uploading.
100 The default file with ignore patterns is \fI.gitftpignore\fR in project root,
101 however you can specify your own for every branch in .git/ftpdata:
109 gitftpignore=.my_gitftpignore
115 Used syntax is same as gitignore's with the exception of overriding patterns,
116 eg. "\fI!\fRsome/pattern", which is not supported.
117 Negations within patterns works as expected.
120 .SH "USING A BARE REPOSITORY AS A PROXY"
122 An additional script \fIpost-recieve\fR is provided to allow a central bare
123 repository to act as a proxy between the git users and the ftp server.
125 Pusing on branches that don't have an entry in the \fIftpdata\fR configuration file will have the default Git behaviour - nothing will be pushed over ftp.
127 One advantage is that users do not get to know the ftp credentials (perfect for
130 This is how the workflow looks like:
136 User 1 --+ +--> FTP Staging
138 User 2 -------> Bare Git repository -------> FTP Master
140 User 3 --+ +--> FTP Dev
146 This is how the setup looks like (one \fIftpdata\fR configuration file and a
147 symlink to the update hook):
153 user@server:/path-to-repo/repo.git$ ls
154 HEAD ORIG_HEAD branches config description ftpdata hooks info
156 user@server:/path-to-repo/repo.git/hooks$ ls -l
157 lrwxr-xr-x 1 user user post-recieve -> /path-to-git-ftp/post-recieve
166 Copyright (c) 2008 - 2011
167 Edward Z. Yang <ezyang@mit.edu>, Mauro Lizaur <mauro@cacavoladora.org> and
168 Niklas Fiekas <niklas.fiekas@googlemail.com>
170 Permission is hereby granted, free of charge, to any person
171 obtaining a copy of this software and associated documentation
172 files (the "Software"), to deal in the Software without
173 restriction, including without limitation the rights to use,
174 copy, modify, merge, publish, distribute, sublicense, and/or sell
175 copies of the Software, and to permit persons to whom the
176 Software is furnished to do so, subject to the following
179 The above copyright notice and this permission notice shall be
180 included in all copies or substantial portions of the Software.
182 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
183 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
184 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
185 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
186 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
187 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
188 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
189 OTHER DEALINGS IN THE SOFTWARE.
193 Report bugs in the issue queue on Github
194 <https://github.com/ezyang/git-ftp/issues> or email one of the authors.
199 Used as a part of the \fBgit\fR(1) suite.