sebastian/git-state
sebastian/git-state is a small PHP library for describing the state of a Git checkout. Its Builder returns the origin remote URL, current branch, commit hash, and working directory status, or false when the directory is not a repository.
Builder::commit() method that returns the hash of the commit that is checked out (or false), without requiring an origin remoteHow can I help you explore Laravel packages today?