Re: way to automatically add untracked files?

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

 




On Aug 6, 2007, at 2:17 AM, Johannes Schindelin wrote:

Hi,

On Sun, 5 Aug 2007, Steffen Prohaska wrote:


On Aug 5, 2007, at 6:11 PM, Theodore Tso wrote:

On Sun, Aug 05, 2007 at 02:11:24PM +0200, Johan Herland wrote:
$ hg addremove --help
hg addremove [OPTION]... [FILE]...

add all new files, delete all missing files

Add all new files and remove all missing files from the repository.

New files are ignored if they match any of the patterns in .hgignore.
As
   with add, these changes take effect at the next commit.

Adding a git-addremove command should not be much work, and it would be a lot friendlier to people whose workflow is more aligned with #2 than #1.

Not much work at all:

# git config --system --add alias.addremove "git add . ; git add -u"

But how can I handle the [FILE]... from above?

See
http://git.or.cz/gitwiki/ Aliases#head-714f0aa64cb53eda636d41e16bf2b99477588685

Thanks.

"Starting with version 1.5.3, git supports appending the
arguments to commands prefixed with "!", too. If you need
to perform a reordering, or to use an argument twice, you
can use this trick:

[alias]
        example = !sh -c "ls $1 $0"

NOTE: the arguments start with $0, not with $1 as you are
used from shell scripts." [cited from the link above]

should do the job.

	Steffen


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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