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 24
24
* [ Get git bash completion] ( https://github.com/git-tips/tips#get-git-bash-completion )
25
25
* [ What changed since two weeks?] ( https://github.com/git-tips/tips#what-changed-since-two-weeks )
26
26
* [ 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 )
27
28
28
29
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
29
30
<!-- @doxie.inject end toc -->
@@ -142,5 +143,16 @@ git whatchanged --since='2 weeks ago'
142
143
git checkout < branch-name> && cherry-pick < commit-ish>
143
144
```
144
145
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
+
145
157
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
146
158
<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 83
83
{
84
84
"title" : " Pick commits across branches using cherry-pick" ,
85
85
"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>" ]
86
91
}
87
92
]
You can’t perform that action at this time.
0 commit comments