home | list info | list archive | date index | thread index

[OCLUG-Tech] Re: git aliases, was: acceptable bourne shell function names

On 04/07/09 Bart Trojanowski said:

> [alias]
>         foo = !sh -c " foo ; bar ; ... "

Hmm. This works but for some reason without the initial echo command I just
get a usage message from git.

 addremove = !sh -c "echo foo; git add -A ; removed_files=$(git ls-files
--deleted -z) ; if [ -n \"$removed_files\" ]; then echo \"$removed_files\" |
xargs -0 git rm ; fi"

Mike
-- 
Michael P. Soulier <msoulier [ at ] digitaltorque [ dot ] ca>
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein

Attachment: pgpICBtVWPd5n.pgp
Description: PGP signature