mirror of
https://github.com/namibia/tips.git
synced 2025-01-23 15:18:29 +00:00
Merge pull request #16 from samarpanda/info_from_commit
Find branches containing commit
This commit is contained in:
commit
b0562c1366
12
README.md
12
README.md
@ -24,6 +24,7 @@
|
|||||||
* [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion)
|
* [Get git bash completion](https://github.com/git-tips/tips#get-git-bash-completion)
|
||||||
* [What changed since two weeks?](https://github.com/git-tips/tips#what-changed-since-two-weeks)
|
* [What changed since two weeks?](https://github.com/git-tips/tips#what-changed-since-two-weeks)
|
||||||
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
|
* [Pick commits across branches using cherry-pick](https://github.com/git-tips/tips#pick-commits-across-branches-using-cherry-pick)
|
||||||
|
* [Find out branches containing commit-hash](https://github.com/git-tips/tips#find-out-branches-containing-commit-hash)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
@ -142,5 +143,16 @@ git whatchanged --since='2 weeks ago'
|
|||||||
git checkout <branch-name> && cherry-pick <commit-ish>
|
git checkout <branch-name> && cherry-pick <commit-ish>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Find out branches containing commit-hash
|
||||||
|
```sh
|
||||||
|
git branch -a --contains <commit-ish>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
__Alternatives:__
|
||||||
|
```sh
|
||||||
|
git branch --contains <commit-ish>
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
@ -83,5 +83,10 @@
|
|||||||
{
|
{
|
||||||
"title": "Pick commits across branches using cherry-pick",
|
"title": "Pick commits across branches using cherry-pick",
|
||||||
"tip": "git checkout <branch-name> && cherry-pick <commit-ish>"
|
"tip": "git checkout <branch-name> && cherry-pick <commit-ish>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Find out branches containing commit-hash",
|
||||||
|
"tip": "git branch -a --contains <commit-ish>",
|
||||||
|
"alternatives": ["git branch --contains <commit-ish>"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user