1
0
mirror of https://github.com/namibia/tips.git synced 2024-09-27 13:39:00 +00:00

add git cherry tip

This commit is contained in:
Pratyush 2015-08-17 00:48:33 +05:30
parent 214d46dcac
commit 3048cfb182
2 changed files with 18 additions and 1 deletions

View File

@ -48,6 +48,7 @@
* [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)
* [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)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -204,7 +205,7 @@ git log --no-merges --stat --reverse master..
## Pick commits across branches using cherry-pick
```sh
git checkout <branch-name> && git cherry-pick <commit-ish>
git checkout <branch-name> && cherry-pick <commit-ish>
```
## Find out branches containing commit-hash
@ -329,5 +330,16 @@ git clean -df
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>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -186,5 +186,10 @@
{
"title": "Update all the submodules",
"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>"]
}
]