Search code examples
gitgitksmartgit

Git: cannot see commit on git visual log


I have been learning git by playing with its commands and reading stuff. Here is what I can see, I am expecting a graph similar to what I did on the right.

This is confusing, How should the tree look like because I cannot see my other commits? Why can't I see my commits?

enter image description here

Here is what I did:

  • c08b318 Commited a file called README.md and pushed to master
  • created a branch called somethingnew
  • 643f1b0 modified README.md on somethingnew branch then commit the modified file
  • checkout master branch did 2 commits 1029180 and ad34cc2
  • Then moved checkout somethingnew created a new file called NewFile.txt and commited the file a526cd9

Solution

  • Try gitk --all, which will display all branches and tags in your repository.

    By default, you're getting something like just the current branch's ancestry.