threads / discuss / 21732

commit --quiet option

Subject: commit --quiet option

## tl;dr

3 messages between Nov 24, 2009 and Nov 25, 2009.

replies: 2people: 2as markdown or json

bill lam· Nov 24, 2009, 05:16 UTC · lore

In git version 1.6.6.rc0.15.g4fa8a0 using the --quiet option it still show some output. Is that intended? Specifically I would like to exclude message about the untracked files when using --quite option.

$ git commit -q -m commit # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: .git-completion.bash # modified: bin/mirrorgit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # a123 no changes added to commit (use "git add" and/or "git commit -a")

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
Junio C Hamano· Nov 25, 2009, 01:10 UTC · re: bill lam · lore

Re: commit --quiet option

bill lam <cbill.lam@gmail.com> writes:
> In git version 1.6.6.rc0.15.g4fa8a0 using the --quiet option it still
> show some output.  Is that intended?  Specifically I would like to
> exclude message about the untracked files when using --quite option.

Given that you are getting "you told me to make a commit without preparing anything to commit" error message, I think it can be argued in both ways.

    $ git commit -q -uno -m 'meaningless message'

would omit the listing of Untracked files; a better alternative, depending on what are listed in the section (I take "a123" is an example made-up for reproduction recipe, and you are probably getting something like 'foo.bak' in real life), might be to update your .gitignore, though.

Show 20 quoted lines
> $ git commit -q -m commit
> # On branch master
> # Changed but not updated:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working directory)
> #
> #       modified:   .git-completion.bash
> #       modified:   bin/mirrorgit
> #
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> #       a123
> no changes added to commit (use "git add" and/or "git commit -a")
>
> -- 
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
bill lam· Nov 25, 2009, 02:06 UTC · re: Junio C Hamano · lore

Re: commit --quiet option

On Tue, 24 Nov 2009, Junio C Hamano wrote:
Show 15 quoted lines
> bill lam <cbill.lam@gmail.com> writes:
> 
> > In git version 1.6.6.rc0.15.g4fa8a0 using the --quiet option it still
> > show some output.  Is that intended?  Specifically I would like to
> > exclude message about the untracked files when using --quite option.
> 
> Given that you are getting "you told me to make a commit without preparing
> anything to commit" error message, I think it can be argued in both ways.
> 
>     $ git commit -q -uno -m 'meaningless message'
> 
> would omit the listing of Untracked files; a better alternative, depending
> on what are listed in the section (I take "a123" is an example made-up for
> reproduction recipe, and you are probably getting something like 'foo.bak'
> in real life), might be to update your .gitignore, though.

That git-commit is intended to run inside a cron job for backup from home folder and .files, so 'commit' is better than 'meaningless message'. .gitignore is already maintained however those 'a123' is a real life example, they are artifacts of '3m post-it' files because I rarely use clipboard (c-ins/c-ins) to copy text from one application into another.

Thanks for tips on -uno option.
-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

← back to recent threads