On Tuesday, May 9, 2017 at 3:34:05 PM UTC-7, ashok.s...@gmail.com wrote: > > git log --oneline branch-name --> It lists all the commits. Is there a > filter option with git log to filter only mentioned branch (branch-name) > commits? >
0. Try "git help gitrevisions" and read all of it. That's the authoritative documentation for the ".." syntax. 1. If HEAD is master (e.g., previous "git checkout" was "git checkout master") then you can do this. Notice the leading ".." before the branch-name: git log --oneline ..branch-name 2. Might be easier to just remember to type "master" though: git log --oneline master..branch-name 3. Also, maybe your master is ahead or behind origin/master? Maybe this will be more what you're looking for? git log --oneline origin/master..branch-name 4. There's also an alternative "^" syntax (literally "filter out all commits that lead to ^THIS_ONE"). A..B is a shorthand for ^A B, afterall, and the order doesn't matter (^A B is the same as B ^A). And so you might like this: git log --oneline branch-name ^master 5. And now that I think of it, you can use that syntax to combine #2 and #3 above! :-) git log --oneline branch-name ^master ^origin/master - Regards, Sylvie Davies Founder and Software Engineer, bit-booster.com -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.