1
0
mirror of https://github.com/namibia/tips.git synced 2024-11-15 17:47:12 +00:00

add change by content search tip

This commit is contained in:
eliranm 2017-03-23 15:09:46 +02:00
parent c98730cb76
commit 81f9099a1f
2 changed files with 9 additions and 0 deletions

View File

@ -13,6 +13,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
<!-- Dont remove or change the comment above that can break automatic updates. -->
* [Everyday Git in twenty commands or so](#everyday-git-in-twenty-commands-or-so)
* [Show helpful guides that come with Git](#show-helpful-guides-that-come-with-git)
* [Search change by content](#search-change-by-content)
* [Overwrite pull](#overwrite-pull)
* [List of all files till a commit](#list-of-all-files-till-a-commit)
* [Git reset first commit](#git-reset-first-commit)
@ -179,6 +180,11 @@ git help everyday
git help -g
```
## Search change by content
```sh
git log -S'<a term in the source>'
```
## Overwrite pull
```sh
git fetch origin && git reset --hard origin/master

View File

@ -4,6 +4,9 @@
}, {
"title": "Show helpful guides that come with Git",
"tip": "git help -g"
}, {
"title": "Search change by content",
"tip": "git log -S'<a term in the source>'"
}, {
"title": "Overwrite pull",
"tip": "git fetch origin && git reset --hard origin/master"