Reputation: 2979
There are many times where I have one project bring another repository in as a subtree. This is great and works fine, but it complicates git-log because I end up seeing this unbelievably-long history associated with the subtree and it's placed above the history of my branch, making it much harder to see what's going on in my branch/master/etc.
Is there a way to tell git-log to ignore all commits reachable by a certain commit? I'm thinking of making a project-specific pretty-log script that knows some of the commit IDs of the things subtree'd-in so I can have it automatically filter those out and show me a more-useful git-log.
Upvotes: 1
Views: 345
Reputation: 51780
In your situation with a subtree : @ChrisMaes comment linking to how to ignore a directory is a good suggestion.
Yes, you tell git log
to ignore a commit and its parent.
Quoting git help log
:
Thus, the following command:
$ git log foo bar ^baz
means "list all the commits which are reachable from
foo
orbar
, but not frombaz
".
At the end of the "Description" paragraph of git help log
, you can read :
The command takes options applicable to the
git-rev-list
command to control what is shown and how [...]
git-rev-list
will tell you all the details of how you can describe a set of commits.
Upvotes: 2