DEV Community

Discussion on: What are your git aliases?

Collapse
 
ehaynes99 profile image
Eric Haynes

Great list! Will definitely add a few of these.

A few more that I like:

# oops, missed a file in prior commit
ca = commit --amend --no-edit
fa = fetch --all --prune
# IMO this option should be the default for force pushing
pf = push --force-with-lease
# thing you do for first push of a branch
pu = push -u origin HEAD
# create a WIP commit without running precommit
wip = commit -m\"WIP\" --no-verify
# "uncommit"
pop = reset HEAD^
# list branches by most recent commit
recent = for-each-ref --sort=-committerdate --count=30 --format='%(refname:short)' refs/heads/
Enter fullscreen mode Exit fullscreen mode
Collapse
 
imjoseangel profile image
Jose Angel Munoz

Thanks for sharing @ehaynes99 ! I will take note of yours too.