File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 2424* [ Get git bash completion] ( https://github.com/git-tips/tips#get-git-bash-completion )
2525* [ What changed since two weeks?] ( https://github.com/git-tips/tips#what-changed-since-two-weeks )
2626* [ Pick commits across branches using cherry-pick] ( https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick )
27+ * [ Find out branches containing commit-hash] ( https://github.com/git-tips/tips#find-out-branches-containing-commit-hash )
2728
2829<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
2930<!-- @doxie.inject end toc -->
@@ -142,5 +143,16 @@ git whatchanged --since='2 weeks ago'
142143git checkout < branch-name> && cherry-pick < commit-ish>
143144```
144145
146+ ## Find out branches containing commit-hash
147+ ``` sh
148+ git branch -a --contains < commit-ish>
149+ ```
150+
151+
152+ __ Alternatives:__
153+ ``` sh
154+ git branch --contains < commit-ish>
155+ ```
156+
145157<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
146158<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 8383 {
8484 "title" : " Pick commits across branches using cherry-pick" ,
8585 "tip" : " git checkout <branch-name> && cherry-pick <commit-ish>"
86+ },
87+ {
88+ "title" : " Find out branches containing commit-hash" ,
89+ "tip" : " git branch -a --contains <commit-ish>" ,
90+ "alternatives" : [" git branch --contains <commit-ish>" ]
8691 }
8792]
You can’t perform that action at this time.
0 commit comments