class Git::Status

The Status class gets the status of a git repository. It identifies which files have been modified, added, or deleted, including untracked files. The Status object is an Enumerable of StatusFile objects.

@example Inspect repository status

repo = Git.open('/path/to/repo')
status = repo.status
status.changed.each { |path, _file| puts "Modified: #{path}" }
status.added.each { |path, _file| puts "Added: #{path}" }
status.deleted.each { |path, _file| puts "Deleted: #{path}" }
status.untracked.each { |path, _file| puts "Untracked: #{path}" }

@deprecated Use {Git::StatusInfo}, returned by {Git::Repository#status_info},

instead; this class will be removed in v6.0.0

@api public