1
0
mirror of https://github.com/namibia/tips.git synced 2024-12-23 02:28:58 +00:00

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) * [List all branch is WIP](#list-all-branch-is-wip)
* [Find guilty with binary search](#find-guilty-with-binary-search) * [Find guilty with binary search](#find-guilty-with-binary-search)
* [Bypass pre-commit and commit-msg githooks](#bypass-pre-commit-and-commit-msg-githooks) * [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>. --> <!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc --> <!-- @doxie.inject end toc -->
@ -721,5 +722,10 @@ git bisect reset # Finish search
git commit --no-verify 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>. --> <!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end --> <!-- @doxie.inject end -->

View File

@ -320,4 +320,7 @@
}, { }, {
"title": "Bypass pre-commit and commit-msg githooks", "title": "Bypass pre-commit and commit-msg githooks",
"tip": "git commit --no-verify" "tip": "git commit --no-verify"
}, {
"title": "List commits and changes to a specific file (even through renaming)",
"tip": "git log --follow -p -- <file_path>"
}] }]