📌
私のgit alias
はじめに
Git Extensionsを業務内外で使用していましたが、諸事情により使えなくなったので、よく使うコマンドをにalias(エイリアス)として整理しました。この記事では、私が実際に使っているGit aliasを紹介します。
alias
[alias]
# グラフ表示のログ(全履歴)
treeall = log --graph --all --pretty=format:'%Cred%h%Creset %C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset %Cgreen(%cd)' --abbrev-commit --date=format-local:'%Y/%m/%d %H:%M:%S'
# グラフ表示のログ(現在のブランチ)
tree = log --graph --pretty=format:'%Cred%h%Creset %C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset %Cgreen(%cd)' --abbrev-commit --date=format-local:'%Y/%m/%d %H:%M:%S'
# developブランチにチェックアウト
dev = checkout develop
# ステージングエリアから変更を戻す
unstage = reset HEAD
# 作業ディレクトリの変更をリセット
resetf = checkout .
# 現在のブランチをpush
pushc = push origin HEAD
# 現在のブランチを強制push
pushf = push --force-with-lease origin HEAD
# リモートとローカルの全てのブランチを表示
ball = branch -a
# ローカルブランチを表示
b = branch
# スタッシュのリストを表示
sl = stash list
合わせて読みたい
Discussion