6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Gitを便利で楽に使うためのaliasをいろんなとこから集めて作ってみた(alias ggr='git grep' #=>ググれ!)

Last updated at Posted at 2012-08-26

コンセプト

  • dotinstallのgit編で再学習しつつ作成
  • 70%はググって見つけたパクリで作られてます。
  • git configに設定すると、git ~~~ の形式になるので、すべてbashのaliasコマンドとして実装しました。
  • prefixとしてgをつけてます。
  • 気に入っているコマンドはggr='git grep'のググれ

alias集

.bashrc
alias gst='git status'
alias gsts='git status -sb'
alias gstt='git status -uno'
alias gsh='git show'
alias glog='git log'
alias glogp='git log -p'
alias glogf='git log --oneline --stat'
alias glogo='git log --oneline'
alias glogg='git log -p --graph --word-diff --pretty=format:"%Cgreen%h %Creset%cd %Cblue%cn %Cred%d"'
alias graph='git log --graph --date=short --decorate=short --pretty=format:"%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s"'
alias grm='git rm'
alias gad='git add .'
alias gcm='git commit'
alias gcmm='git commit -m "$@"'
alias gfix='git commit --amend -m "$@"'
alias gpl='git pull'
alias gps='git push'
alias gco='git checkout'
alias gbr='git branch'
alias gtag='git tag'
alias gdif='git diff'
alias gdifc='git diff --cached'
alias gres='git reset'
alias gresh='git reset --hard "$@"'
alias gme='git merge'
alias ggr='git grep'
alias grem='git remote'

正直なところ

  • たぶん全部使わない
  • 結局慣れるまでいつもどおりgit add .とか入力しちゃっている俺ガイル
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?