Project

htools

0.0
No commit activity in last 3 years
No release in over 3 years
HTools(Handy Tools) a suite of useful tools for IT-guys
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3

Runtime

>= 1.1.0, ~> 1.1
~> 0.8
 Project Readme

HTools

Handy Tools - a suite of useful tools for IT-guys in their everyday work.

Installation

gem install htools

gt-rbs

This is a smart variation of the git rebase command. It helps to make the fastest painless rebase from any branch.

The main idea is to create a backup from your current branch. Then to re-create a new branch from the main that usually is master and perform cherry-pick from the backup branch.

It works just for one top commit (that is the common case when you work in your own feature/###-super-feature branch). Of course, if it contains more commits, before running it you have to squash them with help of git rebase -i HEAD~2 (if you need to squash 2 first commits, etc).

A common scenario of developer daily routines is:

git checkout working-branch
git checkout -b working-branch-bak
git branch -D working-branch
git rev-parse HEAD #=> 4e6d1c95e773c7a4ce7adf60d236b1736d0993ae
git checkout master
git pull origin master
git checkout -b working-branch
git cherry-pick 4e6d1c95e773c7a4ce7adf60d236b1736d0993ae

And magic command gt-rbs do it for you, just type:

ht gt-rbs master working-branch

On any step, if something went wrong you can press q and then recover all that you need from working-branch-bak branch.