The long way through Software Craftsmanship

Tip: committing to the repo file by file

Jul 8, 2015 - 1 minute read - Comments - tipprotipgitbashpolish-your-toolsautomation

I was prefer committing to the repo with commits that are as small as possible as long as it makes sense. It makes it much easier to rever the changes.

This is why I have some scripts to commit all the changes, even with the same message. This is one of them:

for f in $(git status -s |grep "^M"|awk '{print $2}'); do
  git add $f
  git commit -m "generic commit for all files"