3 ms·
My own ~/.gitconfig looks like this: [alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:'%h %ad
by chungy 2y ago
My own ~/.gitconfig looks like this:
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
type = cat-file -t
dump = cat-file -p
dft = difftool
[tag]
sort = version:refname
[tar "tar.xz"]
command = xz -c
[tar "tar.zst"]
command = zstd -T0 -c
[log]
date = iso-local
[pull]
ff = only
[diff]
tool = difftastic
[safe]
directory = *
[advice]
detachedHead = false
[init]
defaultBranch = master
- chungy 2y agoShortened aliases come from cvs/svn land, sorting tags by a logical manner, adding some extra archive types for "git archive", making it so git log always shows my local time zone, pull will never do a non-ff merge, make it so Git doesn't complain about repositories in places it doesn't like, turning off an annoying message about a detached HEAD state, and shut git up about the default branch.
- schacon 2y agoYeah, I didn't do aliases on purpose, because I wanted everything to be fairly global, where I feel like aliases are more personal. But yes, aliases are great.
- feelamee 2y agoas for me, I want something more. Like git shell. Where I no need to write git, git, git again and again. Strange that there is no something like this yet.
- desperatecuban 2y agoDont the many git TUI clients (tig, lazygit, ...) work like that with keybindings?
- feelamee 2y agoyes, but I prefer writing status, stash, checkout, commit hand by) So, the more I think about my previous comment the less sense I see in such feature :)
- gosub100 2y agoDo your aliases even save you any keystrokes? Most shells support auto complete, and you still have to type "git" unless you have a shell alias for it. I guess what I'm git-ing at is a truly efficient alias would be embedded in the shell. For a while I had "gsno = git status --uno" although it's been so long since I used it, I forget what the options even did. Somehow I get by with only stock commands. Another helpful alias I used to use was ctrl-space, I had aliased for 'make'. Somehow I liked it because you can almost gesture it with slamming both hands down simultaneously.
- cillian64 2y agoI have a load of these shell aliases as I spend a frankly ridiculous amount of time messing with git. `g` is `git status`, `d` is `git diff`, `gad` is `git add`, `ds` is `git diff --staged`, `gg` is `git grep`, `gbv` is `git branch -va`