Skip to content

Instantly share code, notes, and snippets.

@ianjamieson
Last active January 28, 2023 22:02
Show Gist options
  • Save ianjamieson/55ec01a4be62006171ff1a4fa862bb72 to your computer and use it in GitHub Desktop.
Save ianjamieson/55ec01a4be62006171ff1a4fa862bb72 to your computer and use it in GitHub Desktop.
A few useful git aliases for your command line
alias gs="git status"
alias git-status-file='function _git_file(){ git diff --name-only | sed -n ${1}p };_git_file'
alias gsf="git-status-file"
alias gcp1="gsf 1 | pbcopy"
alias ga="git add"
alias gap="git add . -p"
alias gd1='gd $(gsf 1)'
alias ga1='ga $(gsf 1)'
alias gc1='gc $(gsf 1)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment