Re: git log alias with --all and --exclude

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 04.09.24 um 11:06 schrieb Rene Kita:
> I have an alias
> 'gr = log --oneline --abbrev-commit --all --graph --decorate --color'
> and I would like to be able to sometimes exclude a branch, so call it
> with:
> $ git gr --exclude=pattern
> 
> This does not work, though. Also does not work without the alias and
> typing the complete command by hand. Apparently the --exclude must be
> put before the --all to take effect.

That is very much by design, so that you can express "branches except
the wip and preview branches and remotes except those from the remote
archive" with

--exclude=wip/* --exclude=preview* --branches --exclude=archive/* --remotes

These collective branch options --branches, --remotes, and --all clear
the exclude patterns after having them applied. Therefore, in this example,
the first two --exclude do not affect --remotes.

-- Hannes





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux