rgit: rational git

gitのコマンド体系がひどいので、rational なものを考える。

  • rgit 操作対象物 動詞 オプション 引数

操作対象物は:

  1. current: HEADラベルとワーキングツリーのこと
  2. branch-label: .git/refs/heads/* のラベルのこと
  3. index: .git/index のこと
  4. object: .git/objects/* のこと
  5. config: .git/config, ~/.gitconfig のこと
  6. tag: .git/refs/tags/* のこと
  7. wtree: ワーキングツリーのこと

現状の悪い例とラショナル化:

  • git add file → rgit index state file
  • git branch → rgit branch-label list
  • git branch -v → rgit branch-label list --detail
  • git branch -vv → rgit branch-label list --detail-remote
  • git tag → rgit tag list
  • git tag newtag → rgit tag create newtag
  • git tag -n5 mytag → rgit tag show mytag
  • git status -s → rgit wtree list-status
  • git branch newbranch → git branch-label create newbranch
  • git checkout somebranch → git current switch-to somebranch
  • git checkout somecommit -- file → rgit object restore somecommit file
  • git commit -m 'foo' (m=message)→ rgit objects commit --message 'foo'
  • git branch -m newBranchName (m=move)→ rgit branch-label rename-to newBranchName
  • git push origin :feature/a (リモートの feature/a を削除する) → rgit --remote=origin branch-label delete feature/a

今後もラショナル化はやる。そのとき、ブログタイトルに "rgit" を入れる。