Is it possible to show only commits and changes created in a specific branch? If I do this before merge it works. If I merge master branch to this branch (to make it actual) then I see commits and merges made in master branch. Is there some way how to filter it?
When you perform a merge, you effectively merge one branch into another—typically a feature branch or bug fix branch into a main branch such as master or develop. Not only will the code changes get merged in, but also all the commits that went into the feature branch.
A merge takes two or more branches, and creates a commit that interleaves the changes in all parents (resolving conflicts, as needed; the user has to decide how). git does not change history by itself.
How do you view all activity in the current branch? To see local branches, use the git branch command. The git branch command lets you see a list of all the branches stored in your local version of a repository.
You can do this using git bash (packaged tool with git), it's an alternative. This is a more effective solution for this question:
git log --graph [branch]
git diff ..master path/to/file
Credits to the author @lukman of this answer to a similar question here on SO.
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