Git : trouver et lister les fichiers modifiés par un utilisateur | Tilap.net
$ git log --pretty="%H" --author="julien" | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq
$ git config alias.nomdelalias 'commande-a-executer'
ou dans .gitconfig
[alias]
files = "!f() { cmd=${1- --since=1.day}; git log --pretty='%H' $cmd | while read commit_hash; do git show --oneline --name-only $commit_hash | tail -n+2; done | sort | uniq; }; f"
Puis en perl :
#!/bin/env perl
use File::Path qw(mkpath rmtree);
use File::Copy;
print "to Deploy\n";
rmtree( 'Deploy' ) if -d 'Deploy';
while ( <> ) {
my( $Org ) = $_;
next if ( $Org =~ m/Tpl/g );
chomp( $Org );
my( @Parts ) = split( /[\/\\]/, $Org );
my( $File ) = pop( @Parts );
my( $Dest ) = join( '/', 'Deploy', @Parts );
mkpath( $Dest ) unless -d $Dest;
copy( $Org, $Dest );
}
exit(0);
Sat 12 Sep 2015 05:53:54 AM UTC - permalink -
-
http://tilap.net/git-trouver-lister-les-fichiers-modifies-par-utilisateur/