How to git log from all branches for the author at once?
I need to get the report of all commits that the author did. So far, I have the script that wraps the following command:
git log --pretty=format:"%ad:%an:%d:%B" --date=short --reverse --all --since=2.months.ago --author=Petr
It works fine. However, it reports only the actions for the current branch. Is there any option that would log the commit messages for the author from all branches, not only form the current one?
- How did I screw up this very simple .gitignore file?
- GIT repository pull command
- See any Git commits directly to master?
- Version control for Google App Engine
- Git, tell me when a remote branch that I am tracking is removed
- Clearing history list of repositories in XCode
In other words, can git make a reverse sorted (by datetime) sequence of all the commits in repository and extract the log info from that sequence?
Solved: (copied from the comment below that is hidden otherwise)
The problem was that I have one repository and two clones to work concurently on two branches. I did push the changes to the origin repository, but I forgot to fetch the changes to the cloned repository. This way it seemed that
--all did not work when using it for the cloned repository.
2 Solutions collect form web for “How to git log from all branches for the author at once?”
Your command is right, since you use the
--all switch which gives all commits from all branches. To answer the question in your comment, it works also in bare repositories.
--all you may want to use
--all also includes