Skip to content

为简洁而生,一键同步 github 仓库,一键发布 hexo 博客……

License

Notifications You must be signed in to change notification settings

LeungGeorge/grit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

为简洁而生,基于 urfave/cli 实现。

Description

一键工具:

  • github 代码库同步(sync)一键同步 github 仓库。
  • hexo 博客预览(preview)、发布(publish)
  • space 目录空间查看工具
  • grit 自身升级工具

Usage

NAME:
   grit - grit is a tool of grimoire, batch execute commands.

USAGE:
   grit [global options] command [command options] [arguments...]

VERSION:
   1.0.0

COMMANDS:
   space    space of current directory.
   update   upgrade to newest version of master.
   help, h  Shows a list of commands or help for one command

   git:
     git  git commands: sync.

   hexo:
     hexo  hexo blog commands: preview, publish.

GLOBAL OPTIONS:
   --message value, -m value  the commit message of git (default: "auto commit")
   --help, -h                 show help
   --version, -v              print the version

git 仓库同步

执行:

grit --m "auto commit " git sync
2019/10/05 11:34:56 status:
2019/10/05 11:34:56 ## master...origin/master
 M command/git/status.go
 M command/git/sync.go

2019/10/05 11:34:56 has file
2019/10/05 11:34:56 Execute git status finished, some file will be committed
2019/10/05 11:34:56 Execute git add finished.
2019/10/05 11:34:56 Execute git commit finished.
2019/10/05 11:34:58 Execute git pull finished.
2019/10/05 11:35:03 Execute git push finished.
2019/10/05 11:35:03 Execute Command finished.

grit space

查看目录空间:

➜  grit git:(master) grit space                      
16B     .gitignore
116B    after
117B    before
151B    CHANGELOG.md
396B    flag
814B    Gopkg.toml
1K      Gopkg.lock
2K      main.go
2K      README.md
7K      command
10K     lib
34K     LICENSE
1M      .git

Install

To install, use go get:

go get -u github.com/LeungGeorge/grit

Contribution

  1. Fork (https://github.com/LeungGeorge/grit/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

LeungGeorge

About

为简洁而生,一键同步 github 仓库,一键发布 hexo 博客……

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published