mirror of
https://github.com/namibia/tips.git
synced 2024-11-15 17:47:12 +00:00
add git cherry tip
This commit is contained in:
parent
214d46dcac
commit
3048cfb182
14
README.md
14
README.md
@ -48,6 +48,7 @@
|
|||||||
* [Forcefully remove untracked files](https://github.com/git-tips/tips#forcefully-remove-untracked-files)
|
* [Forcefully remove untracked files](https://github.com/git-tips/tips#forcefully-remove-untracked-files)
|
||||||
* [Forcefully remove untracked directory](https://github.com/git-tips/tips#forcefully-remove-untracked-directory)
|
* [Forcefully remove untracked directory](https://github.com/git-tips/tips#forcefully-remove-untracked-directory)
|
||||||
* [Update all the submodules](https://github.com/git-tips/tips#update-all-the-submodules)
|
* [Update all the submodules](https://github.com/git-tips/tips#update-all-the-submodules)
|
||||||
|
* [Show all commits in the current branch yet to be merged to master](https://github.com/git-tips/tips#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master)
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
@ -204,7 +205,7 @@ git log --no-merges --stat --reverse master..
|
|||||||
|
|
||||||
## Pick commits across branches using cherry-pick
|
## Pick commits across branches using cherry-pick
|
||||||
```sh
|
```sh
|
||||||
git checkout <branch-name> && git cherry-pick <commit-ish>
|
git checkout <branch-name> && cherry-pick <commit-ish>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Find out branches containing commit-hash
|
## Find out branches containing commit-hash
|
||||||
@ -329,5 +330,16 @@ git clean -df
|
|||||||
git submodule foreach git pull
|
git submodule foreach git pull
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Show all commits in the current branch yet to be merged to master
|
||||||
|
```sh
|
||||||
|
git cherry -v master
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
__Alternatives:__
|
||||||
|
```sh
|
||||||
|
git cherry -v master <branch-to-be-merged>
|
||||||
|
```
|
||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
@ -186,5 +186,10 @@
|
|||||||
{
|
{
|
||||||
"title": "Update all the submodules",
|
"title": "Update all the submodules",
|
||||||
"tip": "git submodule foreach git pull"
|
"tip": "git submodule foreach git pull"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Show all commits in the current branch yet to be merged to master",
|
||||||
|
"tip": "git cherry -v master",
|
||||||
|
"alternatives": ["git cherry -v master <branch-to-be-merged>"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user