git: dealing with multiples changes at sametime

So, you did tons of change in your source and now it is time to commit. Great !

But then you look at the list of file to add in your commit and it scares you. “Should I git add one by one ?” The answer is no !

To remove a set of files at sametime:

git ls-files --deleted -z | xargs -0 git rm

To add a modified set of files at same time:

git ls-files --modified -z | xargs -0 git add

That’s all !


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s