K
K
Konstantin2011-09-23 14:03:14
git
Konstantin, 2011-09-23 14:03:14

git commit . only for files modified by current unix user (owner different)

Really?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
clamaw, 2011-09-23
@clamaw

A cursory search showed that, by default, a (unix-like) system does not store the user who last accessed a file. So you need to fence something extraordinary :)

C
clamaw, 2011-09-23
@clamaw

I can suggest the following one-liner:
git add $(find . -type f -user $(id -u %user_name%) | nawk '!/\.\/git/')
It will only add files owned by %user_name% to the index

U
unreturned, 2011-09-23
@unreturned

My version:
ls -l | grep ^- | grep -i `whoami` | gawk -F " " '{ print $8 }' | xargs git add
Well, then make a commit :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question