[Git] 人間らしい Git のエイリアスを設定してみた

ctl + r で amend を毎回探していることに気がついたので設定してみました。
忘れるので memo.

[markdown]
こちらを参考させて頂きました。

> [人間らしいGitのエイリアス | プログラミング | POSTD](http://postd.cc/human-git-aliases/)

`.gitconfig` に ailias を設定できるので、ひとまずそのまま追加する。

“`prettyprinted:.gitconfig
[alias]
branches = branch -a
tags = tag
stashes = stash list
unstage = “reset -q HEAD — ”
discard = “checkout — ”
uncommit = reset –mixed HEAD~
amend = commit –amend
nevermind = !git reset –hard HEAD && git clean -d -f
graph = log –graph -10 –branches –remotes –tags –format=format:’%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order precommit = diff --cached --diff-algorithm=minimal -w unmerged = diff --name-only --diff-filter=U remotes = remote -v ``` > [dotfiles/gitconfig.symlink at master · gggritso/dotfiles](https://github.com/gggritso/dotfiles/blob/master/gitconfig.symlink)

`branches`, `tags`, `stashes`, `amend`, `remotes` あたりは使いそう。
他を使いこなせるかどうか。

例えば `git checkout — ` の意味。

> * [Git Tutorial – Try Git](https://try.github.io/levels/1/challenges/17)
> * [Git – git-checkout Documentation](https://git-scm.com/docs/git-checkout)
> * [git-checkout(1)](http://ktateish.github.io/git-doc-ja_JP/Documentation/git-checkout.html)
[/markdown]