From cc2f616e566a1fa964d18b43ef11f3598092d9a0 Mon Sep 17 00:00:00 2001 From: David-Wobrock Date: Wed, 8 Jun 2016 22:54:04 +0200 Subject: [PATCH] Add tip for tracing all changes made to a file --- README.md | 6 ++++++ tips.json | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a284765..b7ae31d 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 -- +``` + diff --git a/tips.json b/tips.json index 5d804b7..0f82f57 100644 --- a/tips.json +++ b/tips.json @@ -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 -- " }]