Arun Agrawal’s Blog

Ruby on Rails Developer

Using Git Revert

Hi,

We are doing revert our code in different different ways.

The basic way of doing this using git revert command.

The git revert commit command is substantially similar to the command git cherry-pic commit with one important difference: it applies the inverse of the given commit. Thus, this command is used to introduce a new commit that reverses the effects of a given commit.

My Current master status

    A => B => C => D => E
  

If we are reverting commit D

Then it will become

    
      A => B => C => D => E => D”
    
    Here D” is the commit reverse of D
  

Arun

Rake Migration

Hi,

I have started working on a plugin which helps rails projects to maintain the list of rake tasks.

Here what i am doing is we are maintaining files using version numbers.

As one rake command will tell us what is left to be run in a team environment.

Suppose i have written a rake task or some ruby code to be execute on the db in a order.

Other team member also want’s to run that task on their DB and as well as on production environments.

What this plugin is doing is, when you want to add some ruby code or want’s to run some ruby code in a sequence.

Just create an empty ruby file using rake migration generator and add ruby stuff there.

if you have migrate that file into the DB. Which means that you have applied that ruby code into your environments. Other developer can take your changes and just migrate those things in their DB also.

Idea is same like as DB Migrations are working.

Here is the URL for plugin

http://github.com/arunagw/rake_migration

This plugin is under development currently.

Cheers,

Arun Agrawal