Aliasing Your Git Commands for Maximum Developer Efficiency
tutorialedge.net
Aliasing Your Git Commands for Maximum Developer Efficiency
1–10 of 31 posts
Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#2ga = git add -A
gc = git commit
gcm = git commit -m
gp = git push
All of these are defined in my zshrc rather than doing it through git config.
Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#3https://github.com/ohmyzsh/ohmyzsh?tab=readme-ov-file
https://kapeli.com/cheat_sheets/Oh-My-Zsh_Git.docset/Content...
Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#4Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#5For me, the seconds this saves in typing don't outweigh the annoyance of trying to pair with another developer who only uses their own special aliases.
Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#6Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#7thanks, I hate it. For me, the seconds this saves in typing don't outweigh the annoyance of trying to pair with another developer who only uses their own special aliases.
Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#8Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#9Actually, no, there is also "git_show_branch" because every time I needed that in the shell, I could never remember the proper incantation. Something to do with rev-parse or something?
Re: Aliasing Your Git Commands for Maximum Developer Efficiency
#10I have several git alias that I live by: ga = git add -A gc = git commit gcm = git commit -m gp = git push All of these are defined in my zshrc rather than doing it through git config.
alias ga="git add"
alias gaw="git add -A && git diff --cached -w | git apply --cached -R"
alias gb="git branch"
alias gbl="git branch -l"
alias gbD="git branch -D"
alias gbu="git branch -u"
alias gc="git commit"
alias gca="git commit -a"
alias gcaa="git commit -a --amend"
alias gcam="git commit -a -m"
alias gce="git commit -e"
alias gcfu="git commit --fixup"
alias gcm="git commit -m"
alias gco="git checkout"
alias gcob="git checkout -b"
alias gcoB="git checkout -B"
alias gcp="git cherry-pick"
alias gcpc="git cherry-pick --continue"
alias gd="git diff"
alias gd^="git diff HEAD^ HEAD"
alias gds="git diff --staged"
alias gl="git lg" # TODO - make these options defaults for "git log" itself
alias glg="git log --graph --decorate --all" # TODO - make these options defaults for "git log" itself
alias gdc="git diff --cached"
alias gpom="git push origin master"
alias gr="git remote"
alias gra="git rebase --abort"
alias grb="git rebase --committer-date-is-author-date"
alias grbom="grb --onto master"
alias grbasi="git rebase --autosquash --interactive"
alias grc="git rebase --continue"
alias grs="git restore --staged"
alias grv="git remote -v"
alias grh="git reset --hard"
alias grH="git reset HEAD"
alias grH^="git reset HEAD^"
alias gs="git status -sb"
alias gsd="git stash drop"
alias gsl="git stash list --date=relative"
alias gsp="git stash pop"
alias gss="git stash show"
alias gst="git status"
alias gstn="git status -uno"
alias gsu="git standup"
alias gforgotrecursive="git submodule update --init --recursive --remote"