by fredley · 9y ago · 0 comments
gs git status
gp git push
gac git commit -am
gc git commit
gcm git commit -m
gA git add -A
gC git checkout
ga git add
gd git diff
gm git merge
gmc git merge --continue
gpu git pull
grc git rebase --continue
The only problem is that I cannot use git on anybody else's machine, the muscle memory is too strongly ingrained now. This is a common message: The program 'gs' is currently not installed. You can install it by typing:
sudo apt install ghostscript $ -gsBut anyway, if someone asks for help with "how to fix my mess in git", the absolutely first thing I do is exactly `git log --graph --decorate --all --oneline`, to start finding out visually what the mess actually is.
Of course, my personal solution instead of aliases was to switch to using SourceTree.
A few more I live and die by:
gf git fetch --all; git fetch --tags
gh git log --oneline --abbrev-commit --all --graph --decorateedit: yep, per git help log:
--oneline
This is a shorthand for "--pretty=oneline --abbrev-commit"
used together. gdc git diff --cached
gg git grep -n
gss git status -s
glo git log --oneline
gamend git commit --amend --no-edit