Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd prefer to hear everyone's home-cooked list of aliases to encapsulate all the git command-line funkiness. I'll start:

  - last: `git log -1 HEAD --stat`
  - past: `git log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat`
  - save: `!git add -A && git commit -m 'save'`
(Hat tip to those who helped me with these. I stand on the shoulders of giants.)


The save command can be rewritten to 'git commit -am "save"' for brevity (caveat: I don't know if -A is different from -a for the two commands).


Not really. It's in the manpage:

  commit -a
    Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.

  add -A
    Update the index[...] This adds, modifies, and removes index entries to match the working tree.
So commit -a won't track new files, but add -A will.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: