gitのコマンド体系がひどいので、rational なものを考える。
- rgit 操作対象物 動詞 オプション 引数
操作対象物は:
- current: HEADラベルとワーキングツリーのこと
- branch-label: .git/refs/heads/* のラベルのこと
- index: .git/index のこと
- object: .git/objects/* のこと
- config: .git/config, ~/.gitconfig のこと
- tag: .git/refs/tags/* のこと
- 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" を入れる。