nit_for_git

1.0.30 • Public • Published

Nit For Git

https://www.npmjs.com/package/nit_for_git

npm install nit_for_git

https://github.com/beplaya/Nit

                  .:':'`:·          ,:´'`;' ‘         ',:'/¯/`:,            ,.-~·-.,__,.-::^·- .,'   ‘
                /:::::::/`·,      /::::/;‘         /:/_/::::/';'        /:::::::::::::::::::::::::/'; '
               /:·*'`·:/:::::' , /·´'`;/::';'       /:'     '`:/::;‘     /;:·–– :;:::::_ ;: – .,/::;i'‘
             ,'         `:;::::'`i    ';:::';       ;         ';:';‘    /´          ¯¯           ';::/  
             ;            '`;:::'i    'i::::i       |         'i::i   ,:                          ,:/    
             i               `;:';    'i:::i'       ';        ;'::i   ';_,..–-.,_     _    _,.·´‘     
             i      ,          \|     '|:::i°      'i        'i::i'            ,·´'    '`·;'i¯            
             |     ,'`,                i:;'' ‚       ;       'i::;'            i         'i:i'       ’     
             'i    'i:::i',             ';/'          ';       i:/'             ';        ';:i'     ’       
             'i     ;::/ \           ;/'             ';     ;/ °              i        i:/'             
              \    'i/    '`·,      ,''                ';   / °                 ;      i/    °          
               '`~´         '`·–·'´'                  `'´       °              \   '/'                 
                                ‘                     ‘                         ¯               °  

About

  • Nit combines multiple git commands into useful bundles. e.g. nit qrci stages and commits only your README.md.
  • Nit enhances 'feature/KEY-###' with 'develop' branch development (see nit fb, nit fci, nit upderge, and more)
  • Nit accesses JIRA's rest api (see nit nerver, nit describe, and nit comments)
  • Nit has a team server (see nit team)
  • Nit formats Git output where appropriate
  • Nit enables "" free commit message nit ci This is my message. No quotation marks needed!!!
  • Nit passes through to Git any unrecognized command
  • Nit avoids doing things that aliases can do

Commands

Enable debug by placing a file in the nit directory names 'debug'
        help            > Help
        st              > Status
        sts             > Status -s
        b               > Discover branch
        l1              > 'git log --pretty=oneline' with extra Nit formatting
        push            > Push (assumes origin/<branch>)
        pull            > Pull (assumes origin/<branch>)
        cob             > Create and checkout branch
        fb              > Create and checkout feature branch
        dev             > Checkout develop
        derge           > Merge develop into current branch
        upderge         > Update develop and merge develop into current branch
        stage           > Stage
        ci              > Commit
        fci             > Make a commit on feature
        qrci            > Quick stage and commit only README.md with a generated message "['currentBranch'] README update."
        team            > Start team nerver

If you work with JIRA, you may work in the following manner:

Traditional Git (11 lines. 282 chars.):

git checkout develop
git pull origin develop

git checkout -b feature/PROJECT-101

git add .
git commit -m "PROJECT-101 did some things!"
git push --set-upstream-to origin/feature/PROJECT-101

git checkout develop
git pull
git checkout feature/PROJECT-101
git merge develop

pit push origin feature/PROJECT-101

Nit (8 lines. 82 chars.):

nit dev
nit pull

nit fb 101

nit stage
nit fci "did some things!"
nit push

nit upderge

nit push

Nit passes through to git

If Nit does not recognize a command it will simply pass the command and args to Git, and give the same output as traditional Git. Therefore, you do not need to switch from "nit" to "git" for any command. You can always use "nit"!

Team Nerver

Team Nerver is a central point where team commits are visualized (prompts for Jira credentials): http://TeamNerverHost:yourTeamNerverPortIn (set port in .nitconfig)

Note:
  • Nerver does not write your JIRA credentials to disk. However, they are stored in RAM. It's recommended to use a functional user for Nerver.
  • Nerver is set to stop itself after 24 hours of running.
  • Team Nerver is set to never stop

Configuration

  • Create a .nitconfig file in repo root
  • Example .nitconfig:
{
    "projectKey": "NIT",
    "jira": {
        "host": "???"
    },
    "nerver" : { 
        "team" : { 
            "url": "localhost", 
            "port":9100
        }
    }
}

Setup

  • Install Node.js
  • (Optional) Install Bower
  • Currently the npm install is broken. 😢 Fortunately, you can simply clone the repo and use Nit.
    • Setup your PATH appropriately (examine the "nit" file to change the expected path variable name $NIT)
      • Mac/Linux
        • open ~/.bash_profile

        • Add lines:

          export NIT="/path/to/repo/nit/"

          export PATH=${PATH}:"$NIT

      • Windows
        • Add environment variable "NIT" set equal to "/path/to/repo/nit"
        • Append the $NIT environment variable to the path environment variable.
  • Run nit setup
  • Run nit to ensure the PATH is setup correctly. You should see the logo. It's enormous; you can't miss it.
  • nit help for help

Dependents (0)

Package Sidebar

Install

npm i nit_for_git

Weekly Downloads

36

Version

1.0.30

License

MIT

Last publish

Collaborators

  • beplaya