# README
gitgo
git management, format commit message and customization
Commands
This CLI will usage syntax as gitgo [<global option>] [command] [subcommand] [<option>] arguments...
Initial
Details
Description
For initial git, same as git init
Example usage
gitgo init
gitgo i
Options | Description |
---|---|
--force | -f | Force reinitial git |
Destory
Details
Description
Delete git repo, remove .git folder
Example usage
gitgo destroy
gitgo d
Options | Description |
---|---|
--force | -f | Force delete without prompt |
Status
Details
Description
Show git status, same as git command git status
Example usage
gitgo status
gitgo s
Options | Description |
---|---|
--force | -f | Force delete without prompt |
Configuration
Details
Description
Manage cli configuration
Example usage
gitgo configuration
gitgo config
gitgo g
Actions
gitgo config
- open configuration file by default text-editor (use environment variable call$EDITOR
)gitgo config location|l
- show current location of configuration filegitgo config --key <key>
- get value in config file by keygitgo config --key <key> --value <value>
- set value into config file
Options | Description |
---|---|
--key | -k | Input config key, separate layer by . |
--value | -v | Input config value, use only want to save new value |
Example Configuration
By default configuration folder will be on
- Default
~/.config/github.com/kamontat/gitgo/config/
- Also able to get from
$GOPATH/src/github.com/kamontat/gitgo/config/
config:
commit:
type: text # text | emoji
emoji: string # string | emoji
key:
require: true # true | false
title:
require: true # true | false
auto: false # true | false
size: 50 # maximum charecter size
message:
require: true # true | false
showsize: 8 # list when show the 'commit list'
editor: '' # vim | nano | other cli..
Extra
This syntax of key is separate by dot, e.g. config.editor
, config.commit.key
etc.
Add
Details
Description
Add file/folder to git, similar with git add <args>
Example usage
gitgo add
gitgo a
Actions
gitgo add <args>
- add (files or folder) into gitgitgo add all|a
- add every files and folders into gitgitgo add --all|-A
- same asgitgo add all
Options | Description |
---|---|
--all | -A | Add every files and folders to git |
Commit
Details
Description
Git commit with default format and custom syntax. Next plan this will able to custom git message format.
Example usage
gitgo commit
gitgo c
Actions
gitgo commit
- commit with configtype
and this will prompt information to user, for generating commit messagegitgo commit emoji|moji|e
- commit message withemoji type
gitgo commit text|t
- commit message withtext type
Create commit with special actions
gitgo commit initial|init|i
- generate initial commit with default message and commit configtype
gitgo commit release|r
- generate release commit with default message, including auto generate git taggitgo commit emoji|moji|e initial|init|i
- initial commit message withemoji type
gitgo commit emoji|moji|e release|r
- create release commit message withemoji type
gitgo commit text|t initial|init|i
- initial commit message withtext type
gitgo commit text|t release|r
- create release commit message withtext type
Options | Description |
---|---|
--add | -a | Include add option into commit (git -am "") |
--all | -A | Run git add --all command, before commit code |
--key | -k | Add commit key to commit message |
--title | -t | Add commit title to commit message |
Commit type
On commitment, I create 2 type of them
- Emoji type, emoji type will split commit purpose by emoji. Those emoji you able to custom by yourself without modify anything in the code (by config)
- Text type, this type will use text to split purpose commit by text and also customizable (by config)
Commit message
Default commit message will follow this format.
For text type
[key]: title
message
For emoji type
key: title
message
The concept of this format is easy to read
and reproduce to changelog
. This split messages to 3 sessions key, title and message
Commit key
Commit key should be short, easy to understand, singular, and 1 word. This parameter will use for easy to reverse or check the result of a commit and understand what is commit duty.
For example: test
, improve
, fix
, feature
Commit title
Commit title should short, clear and not longer than 50 words. This parameter will use for create changelog, and tell more information about commit.
Commit message
This parameter will use for deeply information about the commit, This should tell everything of the commit, in case later developer need to reverse to this commit, all known bug, error, information, etc.
Basically this commit will use only release version (include alpha, beta) or tag version
Push
Details
Description
Push local git repository update to server (Github, Bitbucket, etc.)
Example usage
gitgo push
gitgo p
Actions
gitgo push [<branch>...]
- push local code to input branch ormaster
(default)gitgo push --repo <repo> [<branch>...]
- push local code as input branch ormaster
(default) to input remote repository ororigin
(default)gitgo push set|s <link>
- initial/set push server and remote, this command will create remote, set upstream to current branch, and push code changes
Options | Description |
---|---|
--force | -f | Force to push local code to server code |
--repository | --repo | -r | Change repository remote, default is origin |
--branch | -b | Change server branch, default is master (for SET only) |
Pull
Details
Description
Pull a repository/code from a server git to local git
Example usage
gitgo pull
gitgo P
(capital P)
Actions
gitgo pull [<branch>...]
- pull code from server by input branch (default ismaster
) to current branch
Options | Description |
---|---|
--force | -f | Force to push local code to server code |
--repository | --repo | -r | Change repository remote, default is origin |
Creator
Kamontat Chantrachirathumrong
LICENSE
Details
Copyright 2018 Kamontat Chantrachirathumrong
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.