-
-
Save archer884/912e27fa8b59df656ad6962e052a3a51 to your computer and use it in GitHub Desktop.
This file contains 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] | |
co = checkout | |
# New branch | |
nb = checkout origin -b | |
# Push new branch | |
pnb = push -u origin HEAD | |
# Log Graph | |
lg = log --oneline --decorate --graph | |
# Log (Graph) All | |
la = log --oneline --decorate --graph --all | |
# New Since master | |
new = log --oneline --decorate --reverse origin.. | |
# Update from origin; keep master in sync; rebase on latest | |
up = !git fetch --all --prune && git rebase origin && git push . origin/HEAD:master 2>/dev/null | |
# Update from origin; keep master in sync; don't rebase on latest | |
upish = !git fetch --all --prune && git push . origin/HEAD:master 2>/dev/null | |
# Reset to upstream (e.g. someone force-pushed) | |
rup = reset @{u} | |
# Diff what's in index | |
di = diff --staged | |
ci = commit | |
cia = commit --amend -C HEAD | |
ciar = commit --amend -C HEAD --reset-author | |
rbi = rebase --interactive | |
rbc = rebase --continue | |
rbe = rebase --edit-todo | |
rba = rebase --abort | |
# Rewrite in-place (rather than rebase on latest) | |
rwi = !git rebase --interactive $(git merge-base origin HEAD) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment