Re:Lesser known Git commands
by cm3 on Friday September 30, 2016 @12:37PM
(#12613523)
I don't know if you're aware, so this is just a friendly suggestion: if you define these as git aliases instead, you won't use your shell's namespace and have it available for other aliases. As git aliases you would run it like `git s` or `git ca`. If you also alias git to g it will be `g ca`. If you do that, don't forget to call `__git_complete g __git_main` in .bashrc for it to auto-complete aliases for `g` and not just `git`. For example, to define `ca`, run this
[ Parent
| on HN ]
Re:Lesser known Git commands
by SonOfLilit on Friday September 30, 2016 @02:21PM
(#12614215)
I am of course aware of git aliases (e.g. because OP uses them a lot) but it never occured to me specifically to shorten git to g and find a way to keep autocomplete working.
However, since these are by far my most typed commands (specifically, probably 40% of my executed commands are `s`), I strongly care about the difference even between 1 and 3 keystrokes.
Thanks for your feedback. I wonder if the downvote was because of using bash aliases or for something more substantial...
I never downvote anything, so I'm not sure, but maybe the use of "advise" and "canon" triggered negative votes?
Re:Lesser known Git commands
by SonOfLilit on Saturday October 01, 2016 @08:49PM
(#12620564)
Thanks (if you're still reading this thread), I didn't know "advise" carried negative connotations. I guess it's one of those words that I learned from a dictionary and never stopped to notice that English speakers use it only in much more formal situations than the word in my native language that I'm trying to evoke.
Should that maybe have been "recommend"?
English isn't my 1st language either, but the power of downvotes is misused a lot on the internet, especially when there's no public trail who downvoted. Advise and canon may just carry too strong of a meaning for those who grew up in English-speaking school systems.