Coder Social home page Coder Social logo

rake_commit's Introduction

rake_commit

<img src=“http://travis-ci.org/pgr0ss/rake_commit.png” />

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: 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 a pair, you can use –without-prompt pair.

rake_commit's People

Contributors

pgr0ss avatar dan-manges avatar bguthrie avatar braintreeps avatar pitluga avatar sreeix avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.