Hacker News new | ask | show | jobs
by kbd 1500 days ago
If anyone cares, I do something similar with my git aliases: https://github.com/kbd/setup/blob/master/HOME/.config/git/co...

So, "ga" similarly gives a fuzzy finder of files to "git add" that are actually in git status, "gcp" lets me cherry pick one or more commits from a branch where both the branch and commits are picked with fzf, and so on.

2 comments

Aliases are awesome, I use "git config --global alias.pwd 'symbolic-ref --short HEAD'" for easier management of branches. Instead of "git push -u origin really-long-branch-name", I can just do "git push $(git pwd)".
Here’s what I do for that (aliased to ‘p’): https://github.com/kbd/setup/blob/d95653da5ab367b1e628b97537...
Have you published those tools? I don't find anything relevant via Googling nor searching your repos.
What tools? That's a git config file.
`ga` and `gcp`. Are those part of git?
The only part I left out is that as part of my shell config I automatically alias all my short git aliases (as well as a few special cases). So “gcp” -> “git cp” etc.

https://github.com/kbd/setup/blob/d95653da5ab367b1e628b97537...

I assumed those were aliases for `git a` and `git cp` which are in the config file.
No, they're not in the config file.

`gcp` and `ga` are part of forgit, not OPs config. That's why searching the repo didn't find anything. From the phrasing, I thought they were part of OPs repo.

`gcp` https://github.com/wfxr/forgit/search?q=gcp

`ga` https://github.com/wfxr/forgit/search?q=ga