Script to check if git has local changes

Script to check if git has local changes

In Ruby:

changes = `git status --porcelain`.each_line
    if changes.any?
      $stderr.puts "git says there are untracked files or uncommitted changes"
      exit 1
    end

Comments