Skip to content

Instantly share code, notes, and snippets.

@YutoMizutani
Last active September 22, 2019 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YutoMizutani/1f6b8597f9a9f9ba06e0343377233306 to your computer and use it in GitHub Desktop.
Save YutoMizutani/1f6b8597f9a9f9ba06e0343377233306 to your computer and use it in GitHub Desktop.
今すぐaliasを登録しておくべきGitワンライナー ref: https://qiita.com/YutoMizutani/items/f7c4070887fe41497969
# g: git
alias g='git'
# gs: switch
alias gs='git switch'
fuction gsi (){ git switch issues/$@ }
# gsc: switch with a new branch
alias gsc='git switch -c'
function gsci (){ git switch -c issues/$@ }
# gpr: pull the PR branch
function gpr (){ git fetch upstream pull/$@/head:pr/$@ && git checkout pr/$@ }
# gp: push
alias gp='git push'
alias gpo='git push origin'
function gpoi (){ git push origin issues/$@ }
alias gpoh='git push origin HEAD'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment