LoginSignup
0
1

More than 5 years have passed since last update.

githubのショートカット(エイリアス)メモ

Posted at

職場のパソコンを変更することになったのでメモとして

bash_profileに記述

# git エイリアス
alias ls='ls -alG'
alias gs='git status'
alias ga='git add'
alias gi="git init"
alias gco="git checkout"
alias gcm="git commit -m"
alias gb="git branch"
alias gf="git fetch"
alias gba="git branch -a"
alias gbr="git branch -r"
alias gl="git log"
alias glg="git log --graph --pretty=format:'%C(yellow)%h%C(green)%d%Creset %s %Cblue[%ad]%C(bold blue)<%an>%Creset' --abbrev-commit --date=short --branches --remotes"
alias glp="git log --decorate --stat --patch"
alias gd="git diff"
alias gp="git push"
alias gc="git checkout"
alias gcb="git checkout -b"
alias gcf="git checkout --force"
alias gph="git push origin HEAD"
alias grs="git reset --soft HEAD^"
alias gcma="git commit --amend"
alias gbd="git branch --delete"

# cd エイリアス
alias c.='cd ../'
alias c..='cd ../../'
alias c...='cd ../../../'

# vsターミナル起動
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}

更新

かなり昔だが書いて保存して「はい、つかえるー」なんて思っていた時期もあったけど
source .bash_profile
これをやらないと動きませんので注意

メモとして残しておこう。

0
1
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
0
1