Giter VIP home page Giter VIP logo

improvement-splitter's Introduction

Automatic Improvement Splitting

This script contains a few bash functions to help automate the process of splitting improvements to a different branch.

Setup

A script for setting up the functions is included, but they can easily be added manually to your existing alias file or even directly on your shell profile (please don't 😅)

  1. Clone the repository
  2. Run the setup.sh script to set up new functions/alias
$ chmod +x setup.sh
$ ./setup.sh
  1. Restart your terminal

The setup script currently supports:

  • Zsh
    • Uses the Oh-my-zsh custom folder when applicable
  • Bash

Usage

  1. As you find improvements, tag them with the gcmui command. This is still a normal commit, so you can add a message.
$ git add lib/file-with-unrelated-changes.ex
$ gcmui "Fix ordering of statement"
  1. When you are ready to split the improvements use the gcbui command. You should specify the name of the improvements branch.
$ gcbui hg/small-improvements

Caution

This command will force push your branch to remove the improvements from it.

If you don't want to push the changes, for instance if you don't have a remote or if you're just trying the commands out and you don't want to lose anything you can:

  1. Ensure you've pushed the latest changes to your remote
  2. Use the --local-only flag to stop gcbui from pushing the changes
$ gcbui hg/small-improvements --local-only

All of the improvements should have been moved the selected branch.

The commands gcmui and gcbui should be somewhat familiar as they are based on the common aliases for git commit -m gcm and git checkout -b gcb, with the added ui suffix for unrelated improvements.

improvement-splitter's People

Watchers

Hugo Gonçalves 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.