Searching git commits for a particular change -
Searching git commits for a particular change -
i'm working on 1 particular branch in git repo , notice piece of code thought changed. perhaps alter on branch hasn't been merged master
or current branch on working. how search whole repository, including branches, particular alter 1 source code file?
you can seek , utilize pickaxe (-s
) or regexp (-g
) options of git log
.
git log --all -schange -- path/to/change
(replace alter keyword know representing particular change)
see "how grep (search) committed code in git history?"
as mentioned:
this looks differences introduce or remove instance of <string>
. means "revisions added or removed line 'change
'".
add --all
in order search in branches.
to branch(es) commits part on, can use:
git branch --contains sha1
(as mentioned in "how list branches contain given commit?")
git
Comments
Post a Comment