Hacker News new | past | comments | ask | show | jobs | submit login

Another quick visualization method built into Git:

  git log —-graph —-oneline —-decorate

  # —-graph for the visualization
  # —-oneline for compact commits
  # —-decorate for tag and branch refs
You can also add:

  # —-all to include all branches
I typically add aliases to ~/.gitconfig to use these options by default.



TRIED: git log —-graph —-oneline —-decorate GOT: fatal: ambiguous argument '—-graph': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'


Retype the dashes, you've posted something different to GP, em dash en dash, or something, presumably your browser/clipboard/term did something funky when you copied.


Should be:

    git log --graph --oneline --decorate


Thanks for correcting my error. Stupid “smart” dashes on my phone.




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

Search: