We have recently converted our SVN repositories to GIT. It seems that we lost some commits by this conversion and would like to verify this.
So we would like to find a matching git commit for each svn commit to check whether the conversion has actually occured.
$ git log|grep "some partial commit message"
will not suffice as it only walks through direct ancenstors and ignores branches that are not direct ancestors.
$ git show <commit-hash>
will not work as svn doesn't have sha1sums.
the closest thing I found was: $ git reflog show --all --grep="releasenotes"|xargs git show --shortstat
however this doesn't seem to completely work as it seems to grep in more places than just the commit message (We got a false positive).
I also tried to use this: $ git rev-list --all|xargs -n1 bash -c 'git show|head -n10'|grep -i release
basically I'm lacking a good method to print the commit message without the diffs.
[EDIT]
I'm not exactly sure but I guess this should list all commit messages in the repository.
git rev-list --all|xargs -n1 git log -n1
You can just use the --all
option for git log
git log --all --oneline --graph --decorate | grep "message"
Which is equivalent to
git log --all --oneline --graph --decorate --grep "message"
Or if you would prefer to have the context and don't have a lot of commits you might want to do something like
git log --all --oneline --graph --decorate | less
/ message
And that way you can see where your commits are with respect to other commits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With