Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A program that helps with checking in code. It automates common git or svn commands.
branch: master

Merge pull request #23 from pitluga/configurable_exec

allow build command to be configured
latest commit 4c8d842248
Paul Gross authored
Failed to load latest commit information.
.bundle Upgraded ruby and added a .travis.yml for CI.
bin Added RakeCommit namespace in order to avoid conflicts with Git gem i…
lib rename --build to --build-command
test rename --build to --build-command
.gitignore Removed prebuilt gem and updated .gitignore.
.ruby-gemset Switch from .rvmrc to .ruby-version and .ruby-gemset.
.ruby-version Switch to ruby 2.0.0.
.travis.yml Switch to ruby 2.0.0.
CHANGES Added a svn:revert_all task which reverts all modified files and dele…
Gemfile Switch rubygems to https.
Gemfile.lock
README.md fixes #15 - Add documentation for .rake_commit file.
Rakefile Build the gem in the default rake task to check for problems with the…
rake_commit.gemspec Implement rebase-only option

README.md

rake_commit

Gem Version Build Status

This gem automates a pretty standard workflow when committing code to git, svn, and git-svn. Run rake_commit in your current project, which does the following, depending on source control:

git

  1. Checks in current changes into a temp commit just in case
  2. Resets soft back to origin/branch (in order to collapse changes into one commit)
  3. Adds new files to git and removes deleted files
  4. Prompts for a commit message
  5. Commits to git
  6. Pulls changes from origin (and does a rebase to keep a linear history)
  7. Runs the default rake task (which should run the tests)
  8. Pushes the commit to origin

git-svn

  1. Adds new files to git and removes deleted files
  2. Prompts for a commit message
  3. Commits to local git
  4. Pulls changes from SVN
  5. Runs the default rake task (which should run the tests)
  6. Pushes the commit to SVN

subversion

  1. Prompts for a commit message
  2. Adds new files to subversion
  3. Deletes missing files from subversion
  4. svn update
  5. Runs the default rake task (which should run the tests)
  6. Checks in the code

The first version started with the code posted at Jay Field's Blog: http://blog.jayfields.com/2006/12/ruby-rake-commit.html. Improvements have been added in from several more projects.

Installation

gem install rake_commit

Usage

cd /path/to/project
rake_commit

Command line arguments

--help

Print help information.

--incremental

This will prompt as normal and then commit without running tests or pushing. This is useful for make incremental commits while working.

--no-collapse

This tells rake_commit not to prompt and make a new commit. This is useful when you've done a merge by hand and want to preserve the commit. It will stil run rake and then push if rake succeeds.

--without-prompt <prompt>

This will cause rake_commit to skip the named prompt. For example, if you are working by yourself and do not need to prompt for an author, you can use --without-prompt author.

Configuration

If the same command line arguments are always used, they can be added to a .rake_commit file in the root of the project. For example, this .rake_commit file will tell rake_commit to only prompt for message:

--without-prompt author
--without-prompt feature

License

rake_commit is released under the MIT license.

Something went wrong with that request. Please try again.