Skip to content

Rake task to record the git status in a separate file

License

Notifications You must be signed in to change notification settings

suhlig/git-dirty

Repository files navigation

Git::DirtyFile

Rake task to record the git status in a separate file

Usage

Add it to your Gemfile:

gem "git-dirty"

In your Rakefile:

require 'git-dirty'
git_dirty_file 'tmp/git-status'

Now you will have a new rake target for tmp/git-status�, which will be updated whenever the contents of that file differ from the actual status.

The status is represented by the output of git rev-parse --short HEAD (which provides the SHA of the current git HEAD). If the workspace is dirty (i.e. has new, changed or deleted files), an asterisk (�*) is appended.

License

The gem is available as open source under the terms of the MIT License.

About

Rake task to record the git status in a separate file

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages