Add tip for tracing all changes made to a file

This commit is contained in:
David-Wobrock 2016-06-08 22:54:04 +02:00
parent c49409830a
commit cc2f616e56
2 changed files with 10 additions and 1 deletions

View File

@ -107,6 +107,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [List all branch is WIP](#list-all-branch-is-wip)
* [Find guilty with binary search](#find-guilty-with-binary-search)
* [Bypass pre-commit and commit-msg githooks](#bypass-pre-commit-and-commit-msg-githooks)
* [List commits and changes to a specific file (even through renaming)](#list-commits-and-changes-to-a-specific-file-even-through-renaming)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -721,5 +722,10 @@ git bisect reset # Finish search
git commit --no-verify
```
## List commits and changes to a specific file (even through renaming)
```sh
git log --follow -p -- <file_path>
```
<!-- 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

@ -277,7 +277,7 @@
"tip": "git log Branch1 ^Branch2"
}, {
"title": "reuse recorded resolution, record and reuse previous conflicts resolutions.",
"tip":"git config --global rerere.enabled 1"
"tip": "git config --global rerere.enabled 1"
}, {
"title": "Open all conflicted files in an editor.",
"tip": "git diff --name-only | uniq | xargs $EDITOR"
@ -320,4 +320,7 @@
}, {
"title": "Bypass pre-commit and commit-msg githooks",
"tip": "git commit --no-verify"
}, {
"title": "List commits and changes to a specific file (even through renaming)",
"tip": "git log --follow -p -- <file_path>"
}]