HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/help/man/man1/gcloud_topic_gcloudignore.1
.TH "GCLOUD_TOPIC_GCLOUDIGNORE" 1



.SH "NAME"
.HP
gcloud topic gcloudignore \- reference for \f5.gcloudignore\fR files



.SH "DESCRIPTION"

Several commands in \f5gcloud\fR involve uploading the contents of a directory
to Google Cloud to host or build. In many cases, you will not want to upload
certain files (i.e., "ignore" them).

If there is a file called \f5.gcloudignore\fR \fIwithin the top\-level directory
being uploaded\fR, the files that it specifies (see "SYNTAX") will be ignored.

Gcloud commands may generate a .gcloudignore file; see the individual command
help page for details.

The following \f5gcloud\fR commands respect the \f5.gcloudignore\fR file:

.RS 2m
.IP "\(bu" 2m
\f5gcloud app deploy\fR
.RS 2m
.IP "\(em" 2m
Note: If you add \f5app.yaml\fR to the \f5.gcloudignore\fR file, this command
will fail.
.RE
.sp
.IP "\(bu" 2m
\f5gcloud functions deploy\fR
.IP "\(bu" 2m
\f5gcloud builds submit\fR
.IP "\(bu" 2m
\f5gcloud composer environments storage {dags, data, plugins} import\fR
.IP "\(bu" 2m
\f5gcloud container builds submit\fR
.IP "\(bu" 2m
\f5gcloud run deploy\fR
.IP "\(bu" 2m
\f5gcloud run jobs deploy\fR
.IP "\(bu" 2m
gcloud alpha deploy releases create
.IP "\(bu" 2m
\f5gcloud infra\-manager deployments apply\fR
.IP "\(bu" 2m
\f5gcloud infra\-manager previews create\fR
.IP "\(bu" 2m
\f5gcloud alpha functions local deploy\fR
.IP "\(bu" 2m
\f5gcloud alpha run jobs deploy\fR
.IP "\(bu" 2m
\f5gcloud beta run jobs deploy\fR
.IP "\(bu" 2m
\f5gcloud alpha run worker\-pools deploy\fR
.IP "\(bu" 2m
\f5gcloud beta run worker\-pools deploy\fR
.RE
.sp

To globally disable \f5.gcloudignore\fR parsing (including default file\-ignore
behavior), run:

.RS 2m
$ gcloud config set gcloudignore/enabled false
.RE

The default content of the generated \f5.gcloudignore\fR file, which can be
overridden with \f5\-\-ignore\-file\fR, is as follows:

.RS 2m
.gcloudignore
.git
.gitignore
.RE



.SH "EXAMPLES"

This \f5.gcloudignore\fR would prevent the upload of the \f5node_modules/\fR
directory and any files ending in \f5~\fR:

.RS 2m
/node_modules/
*~
.RE

This \f5.gcloudignore\fR (similar to the one generated when Git files are
present) would prevent the upload of the \f5.gcloudignore\fR file, the
\f5.git\fR directory, and any files in ignored in the \f5.gitignore\fR file:

.RS 2m
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or
# files from your .gitignore file, remove the corresponding line below:
.git
.gitignore
#!include:.gitignore
.RE



.SH "SYNTAX"

The syntax of \f5.gcloudignore\fR borrows heavily from that of \f5.gitignore\fR;
see https://git\-scm.com/docs/gitignore or \f5man gitignore\fR for a full
reference.

Each line in a \f5.gcloudignore\fR is one of the following:

.RS 2m
.IP "\(bu" 2m
\fBpattern\fR: a pattern specifies file names to ignore (or explicitly include)
in the upload. If multiple patterns match the file name, the last matching
pattern takes precedence.
.IP "\(bu" 2m
\fBcomment\fR: comments begin with \f5#\fR and are ignored (see "ADVANCED
TOPICS" for an exception). If you want to include a \f5#\fR at the beginning of
a pattern, you must escape it: \f5\e#\fR.
.IP "\(bu" 2m
\fBblank line\fR: A blank line is ignored and useful for readability.
.RE
.sp

Some example patterns follow; see the full reference
(https://git\-scm.com/docs/gitignore or \f5man gitignore\fR) for details.

To ignore any file named \f5foo\fR, and any file in the root of the upload
directory named \f5bar\fR:

.RS 2m
foo
/bar
.RE

To ignore any file starting with \f5foo\fR, ending with \f5bar\fR, or starting
with \f5baz\fR and ending with \f5qux\fR:

.RS 2m
foo*
*bar
baz*qux
.RE

To explicitly include any file named \f5foo\fR (useful if \f5foo\fR was excluded
earlier in the file) and ignore a file named \f5!bar\fR:

.RS 2m
!foo
\e!bar
.RE

To ignore any directory \f5foo\fR and all its contents (though not a file
\f5foo\fR), any file \f5baz\fR, and the directory \f5qux\fR and all its
contents:

.RS 2m
foo/
**/baz
qux/**
.RE



.SH "ADVANCED TOPICS"

In order to ignore files specified in the gitignore file, there is a special
comment syntax:

.RS 2m
#!include:.gitignore
.RE

This will insert the content of a \f5.gitignore\fR\-style file named
\f5.gitignore\fR at the point of the include line. It does not recurse (that is,
the included file \fBcannot\fR \f5#!include\fR another file) and cannot be
anywhere but the top\-level directory to be uploaded.

To display files that will be uploaded run:

.RS 2m
gcloud meta list\-files\-for\-upload
.RE



.SH "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha topic gcloudignore
.RE

.RS 2m
$ gcloud beta topic gcloudignore
.RE