mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Added new topic: Finding (#168)
* New Topic for 'Finding' Added command which can be used to find a string in any commit * Added command that can be used to find for commits either by author or committer * Fixed link
This commit is contained in:
parent
472f05caf0
commit
418f0a0032
37
README.md
37
README.md
@ -74,6 +74,9 @@ For clarity's sake all examples in this document use a customized bash prompt in
|
|||||||
- [Stash specific files](#stash-specific-files)
|
- [Stash specific files](#stash-specific-files)
|
||||||
- [Stash with message](#stash-with-message)
|
- [Stash with message](#stash-with-message)
|
||||||
- [Apply a specific stash from list](#apply-a-specific-stash-from-list)
|
- [Apply a specific stash from list](#apply-a-specific-stash-from-list)
|
||||||
|
- [Finding](#finding)
|
||||||
|
- [I want to find a string in any commit](#i-want-to-find-a-string-in-any-commit)
|
||||||
|
- [I want to find by author/committer](#i-want-to-find-by-author-committer)
|
||||||
- [Miscellaneous Objects](#miscellaneous-objects)
|
- [Miscellaneous Objects](#miscellaneous-objects)
|
||||||
- [Clone all submodules](#clone-all-submodules)
|
- [Clone all submodules](#clone-all-submodules)
|
||||||
- [Remove a submodule](#remove-a-submodule)
|
- [Remove a submodule](#remove-a-submodule)
|
||||||
@ -865,7 +868,7 @@ Newer, awesomer features
|
|||||||
# You are currently editing a commit while rebasing branch 'master' on '8074d12'.
|
# You are currently editing a commit while rebasing branch 'master' on '8074d12'.
|
||||||
#
|
#
|
||||||
# Changes to be committed:
|
# Changes to be committed:
|
||||||
# modified: README.md
|
# modified: README.md
|
||||||
#
|
#
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -999,6 +1002,7 @@ If at any time you want to stop the entire rebase and go back to the original st
|
|||||||
```sh
|
```sh
|
||||||
(my-branch)$ git rebase --abort
|
(my-branch)$ git rebase --abort
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="stashing"></a>
|
<a name="stashing"></a>
|
||||||
## Stash
|
## Stash
|
||||||
|
|
||||||
@ -1056,6 +1060,37 @@ $ git stash apply "stash@{n}"
|
|||||||
|
|
||||||
Here, 'n' indicates the position of the stash in the stack. The topmost stash will be position 0.
|
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="i-want-to-find-by-author-committer"></a>
|
||||||
|
### I want to find by author/committer
|
||||||
|
|
||||||
|
To find all commits by author/committer you can use:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ git log --author=<name or email>
|
||||||
|
$ git log --committer=<name or email>
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep in mind that author and committer are not the same. The `--author` is the person who originally wrote the code; on the other hand, the `--committer`, is the person who committed the code on behalf of the original author.
|
||||||
|
|
||||||
<a name="miscellaneous-objects"></a>
|
<a name="miscellaneous-objects"></a>
|
||||||
## Miscellaneous Objects
|
## Miscellaneous Objects
|
||||||
|
Loading…
x
Reference in New Issue
Block a user