0

History in GitHub website doesn't show commits done from root.

Is there a way to find commits done from root?

Thanks!

  • 3
    And by "done from root", you mean as in `sudo git commit`? Or what is "root" in this context? – Siguza May 16 '16 at 14:51
  • Note that in the context of Git, "root" usually refers to "root commit", i.e. a commit without parent, typically the first one done on a project. – Matthieu Moy May 16 '16 at 17:07
  • Find the root (parentless) commits: http://stackoverflow.com/questions/1006775/how-to-reference-the-initial-commit – Maic López Sáenz May 16 '16 at 18:16

2 Answers2

2

If root is the author of the commits you can use the --author flag:

git log --author root
felixyadomi
  • 3,197
  • 1
  • 22
  • 28
0

If by root you mean a branch named root, then you can go into the command line and type in:

git log | grep -B 2 'root'

This will return all of the commits done by root, and the commit hash.

Conor Thompson
  • 198
  • 1
  • 15