vpmv / git-auto

Automated branch creator aimed at issue trackers - asserting 'Git Flow'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git auto brancher

Automated branch creator aimed at issue trackers - asserting 'Git Flow'

Basics

Issue trackers generally use prefixes to their projects to ease development. E.G. AcmeCatLauncher = ACL, PancakeBossJester = PBJ.

Git-auto will automatically add this prefix to your branches - by configuration.

Why?

Because creating branches sometimes just isn't fast enough with your favorite IDE, let alone Git CLI. Think of the following situation:

Jamie is working on a hotfix for 'Epic WebApp'. After editing 15 files he discovers he's still on his previous issue's branch. Now Jamie has to go back into git and stash his changes, create his branch and re-apply the stash he just made. Now, what was the project prefix again?

Git-auto provides the solution! Simply typing git-auto -h 676 and EA-676* is automatically created with all changes made, ready to be committed. Simply adding the argument -p <commit message> would even commit and push the changes made.

*: EA is a configured prefix for this project. Configuration is invoked the first time your initiate the app in a project.

Options

Branching options

Option Meaning Parent branch Arguments Status
-f feature develop name Done
-h hotfix master name Done
-r release develop Done
-t tag master WIP
-b branch - name Done
--patch patch develop name WIP

Default: Create feature

Supplying -b <name> will create a separate branch. Temporarily setting a custom prefix is no problem.

Other options

Option Meaning Arguments Status
-p commit & push changes with supplied msg message Done
--dirty don't pull changes before applying stash - Done
--verbose print debug messages - Done
--config reconfigure project prefix prefix Done

What it doesn't do

Solve merge conflicts. Well, sorry, I'm not a wizard.

Pushing changes to a non-existing remote branch is not supported (yet).

Technical details

Requirements: Bash, GIT (+ GIT Flow), write access to $HOME/.config/git-auto.conf (file)

Milestones

  • Branch creation
  • Automatic checkout & pull before feature/hotfix
  • Reconfiguration of active project
  • Automated tagging. Status: finds latest tag and shows incremented version. Work in progress.
  • Creating patches. Status: Just creates a new branch patch/<name>
  • Creating releases by setting version numbers. Status: Just creates a new branch release/<name>.

About

Automated branch creator aimed at issue trackers - asserting 'Git Flow'

License:MIT License


Languages

Language:Shell 100.0%