git-realm is a Git plugin written mainly for fast and/or creative development.
Make sure you have Cracklib packages installed. If not run the following:
# / Debian based systems - Debian, Ubuntu, Linux Mint, etc.
~$ sudo apt-get install libcrack2
# / openSUSE (may not be required)
~$ sudo zypper install cracklib
1/ Clone this repo into your usual location.
2/ Symlink git-realm to /usr/local/bin/
(or a different directory in $PATH
env. variable)
3/ Try git realm help
and if it works, profit!
git-realm can be configured with Git config:
realm.separator
(default: -) Separator character between "realm" and realm name - ie. "realm-decent-stray" or "realm/gastro-tour"realm.commonBranch
(default: master) Common Git branch - could be main, some prefers master, others production.realm.unpackPath
(default: /tmp/cracklib_pw.dict) Where should be saved output of cracklib-unpacker - openSUSE only
~/realm-test@master$ git realm list
base-one
decent-stray
1/ The easy way
New realm is entered from HEAD
.
~/realm-test@realm-base-one % git realm enter
Creating a new realm called 'matrices-gaucherie'...
Switched to a new branch 'realm-matrices-gaucherie'
~/realm-test@realm-matrices-gaucherie %
# * bb52534 (HEAD -> realm-matrices-gaucherie, realm-base-one) feat: Add hello.sh
# * 1d483b6 chore: Update README.md
# * 1d59365 (master) feat: Add README.md
2/ From common branch
~/realm-test@realm-base-one % git realm enter -c
Going to checkout from master branch.
Creating a new realm called 'krause-propounded'...
Switched to a new branch 'realm-krause-propounded'
~/realm-test@realm-krause-propounded %
# * bb52534 (realm-base-one) feat: Add hello.sh
# * 1d483b6 chore: Update README.md
# * 1d59365 (HEAD -> realm-krause-propounded, master) feat: Add README.md
3/ With a custom name
~/realm-test@master % git realm enter BAU-30000
Creating a new realm called 'BAU-30000'...
Switched to a new branch 'realm-BAU-30000'
~/realm-test@realm-BAU-30000 %
1/ New random name
~/realm-test@realm-BAU-30000 % git realm reword
Rewording to 'restrictively-melina'...
~/realm-test@realm-restrictively-melina %
2/ Specific name
~/realm-test@realm-restrictively-melina % git realm reword GRLM-4
Rewording to 'GRLM-4'...
~/realm-test@realm-GRLM-4 %
~/realm-test@realm-GRLM-4 % git realm leave
Leaving realm called 'GRLM-4'...
Switched to branch 'master'
~/realm-test@master %
1/ Currently used realm
~/realm-test@realm-GRLM-4 % git realm dispose
Leaving and disposing currently used realm called 'GRLM-4'...
Switched to branch 'master'
Deleted branch realm-GRLM-4 (was 1d59365).
~/realm-test@master %
2/ Existing realm
~/tempie/realm-test@master % git realm dispose base-one
Disposing realm called 'base-one'...
Deleted branch realm-base-one (was bb52534).
-
git realm enter [realm-name]
will enter new or existing realm - Reword current realm - generated or typed -
git realm reword [realm-name]
- Configuration support
- Merging realms into common branch (like Git-Flow)
- Rewording without entering the realm
- Bash completion
- bash (based upon)
- git (manipulated with)
- coreutils - cat, shuf
- grep
- sed