Last active
November 22, 2019 12:36
-
-
Save alejandrobernardis/192c5ecfc54f8b81829969bf39abb81a to your computer and use it in GitHub Desktop.
git alias
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# push | |
pfa = !git add . && git commit -m 'UPD // First approach' && git push | |
pfx = !git add . && git commit -m 'UPD // Fixes' && git push | |
pfxm = !git add . && git commit -m 'UPD // +Fixes' && git push | |
pfe = !git add . && git commit -m 'UPD // Features' && git push | |
pfem = !git add . && git commit -m 'UPD // +Features' && git push | |
pdo = !git add . && git commit -m 'UPD // Documentation' && git push | |
pdom = !git add . && git commit -m 'UPD // +Documentation' && git push | |
pin = !git add . && git commit -m 'INI // Initial Commit' && git push -u origin master | |
aliases = "!git config --get-regexp '^alias\\.' | cut -c 7- | sed 's/ / = /'" | |
# rollback | |
back = checkout -f . | |
# status | |
ss = status --short | |
ssb = status --short --branch | |
# ls | |
ls = ls-files | |
ls-ignored = ls-files --others --i --exclude-standard | |
# log | |
lg = log --graph | |
lo = log --oneline | |
lp = log --patch | |
lt = log --topo-order | |
lk = log --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset' | |
ll = log -n 10 --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad' | |
# logs | |
log-changes = log --oneline --reverse | |
log-fresh = log ORIG_HEAD.. --stat --no-merges | |
log-local = log --date=local | |
log-me = !git log --author $(git config user.email) | |
log-graph = log --graph --all --oneline --decorate | |
log-first-date = !"git log --date-order --date=iso --pretty=%ad --reverse | head -1" | |
log-day = log --since yesterday | |
log-standup = !git log --since yesterday --author $(git config user.email) --pretty=short | |
log-refs = log --all --graph --decorate --oneline --simplify-by-decoration --no-merges | |
log-timeline = log --format='%h %an %ar - %s' | |
log-local = log --oneline origin..HEAD | |
log-fetched = log --oneline HEAD..origin/master | |
# Reset & Undo | |
reset-commit = reset --soft HEAD~1 | |
reset-commit-hard = reset --hard HEAD~1 | |
reset-commit-clean = !git reset --hard HEAD~1 && git clean -fd | |
reset-to-pristine = !git reset --hard && git clean -ffdx | |
reset-to-upstream = !git reset --hard $(git upstream-name) | |
undo-commit = reset --soft HEAD~1 | |
undo-commit-hard = reset --hard HEAD~1 | |
undo-commit-clean = !git reset --hard HEAD~1 && git clean -fd | |
undo-to-pristine = !git reset --hard && git clean -ffdx | |
undo-to-upstream = !git reset --hard $(git upstream-name) | |
uncommit = reset --soft HEAD~1 | |
unadd = reset HEAD | |
unstage = reset HEAD | |
discard = checkout -- | |
cleanout = !git clean -df && git checkout -- . | |
expunge = !"f() { git filter-branch --force --index-filter \"git rm --cached --ignore-unmatch $1\" --prune-empty --tag-name-filter cat -- --all }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment