def add(path, msg = "", options = {})
      exit_status = 0
      dir  = File.realpath(File.dirname(path))
      root = rootdir(path)
      relative_path_to_root = Pathname.new( File.realpath(path) ).relative_path_from Pathname.new(root)
      real_msg = ((msg.empty?) ? "add '#{relative_path_to_root}'" : msg)
      opts = '-f' if options[:force]
      Dir.chdir( dir ) do
        exit_status = run %(
                  git add #{opts} #{path}
                  git commit -s -m "#{real_msg}" #{path}
                )
      end
      exit_status.to_i
    end
def add(path, msg = "", options = {})
      exit_status = 0
      dir  = File.realpath(File.dirname(path))
      root = rootdir(path)
      relative_path_to_root = Pathname.new( File.realpath(path) ).relative_path_from Pathname.new(root)
      real_msg = ((msg.empty?) ? "add '#{relative_path_to_root}'" : msg)
      opts = '-f' if options[:force]
      Dir.chdir( dir ) do
        exit_status = run %(
                  git add #{opts} #{path}
                  git commit -s -m "#{real_msg}" #{path}
                )
      end
      exit_status.to_i
    end
Add a file/whatever to Git and commit it
 Supported options:
 * :force [boolean]: force the add