New Topic for 'Finding'

Added command which can be used to find a string in any commit
This commit is contained in:
Juan Calvopina 2017-12-09 23:43:06 -03:00
parent 12bc63375d
commit 86be904dd5
1 changed files with 23 additions and 1 deletions

View File

@ -72,6 +72,8 @@ For clarity's sake all examples in this document use a customized bash prompt in
- [Stash specific files](#stash-specific-files)
- [Stash with message](#stash-with-message)
- [Apply a specific stash from list](#apply-a-specific-stash-from-list)
- [Finding](#findig)
- [I want to find a string in any commit](#i-want-to-find-a-string-in-any-commit)
- [Miscellaneous Objects](#miscellaneous-objects)
- [Clone all submodules](#clone-all-submodules)
- [Remove a submodule](#remove-a-submodule)
@ -863,7 +865,7 @@ Newer, awesomer features
# You are currently editing a commit while rebasing branch 'master' on '8074d12'.
#
# Changes to be committed:
# modified: README.md
# modified: README.md
#
```
@ -997,6 +999,7 @@ If at any time you want to stop the entire rebase and go back to the original st
```sh
(my-branch)$ git rebase --abort
```
<a name="stashing"></a>
## Stash
@ -1054,6 +1057,25 @@ $ git stash apply "stash@{n}"
Here, 'n' indicates the position of the stash in the stack. The topmost stash will be position 0.
<a name="finding"></a>
## Finding
<a name="i-want-to-find-a-string-in-any-commit"></a>
### I want to find a string in any commit
To find a certain string which was introduced in any commit, you can use the following structure:
```sh
$ git log -S "string to find"
```
Commons parameters:
* `--source` means to show the ref name given on the command line by which each commit was reached.
* `--all` means to start from every branch.
* `--reverse` prints in reverse order, it means that will show the first commit that made the change.
<a name="miscellaneous-objects"></a>
## Miscellaneous Objects