diff --git a/README.md b/README.md index 6c7d6fc..0ee8d02 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ * [Overwrite pull](https://github.com/git-tips/tips#overwrite-pull) -* [List of all the files changed in a commit](https://github.com/git-tips/tips#list-of-all-the-files-changed-in-a-commit) +* [List of all files changed in a commit](https://github.com/git-tips/tips#list-of-all-files-changed-in-a-commit) +* [List of all files till a commit](https://github.com/git-tips/tips#list-of-all-files-till-a-commit) * [Git reset first commit](https://github.com/git-tips/tips#git-reset-first-commit) * [List all the conflicted files](https://github.com/git-tips/tips#list-all-the-conflicted-files) * [List all branches that are already merged into master](https://github.com/git-tips/tips#list-all-branches-that-are-already-merged-into-master) @@ -35,7 +36,12 @@ git fetch --all && git reset --hard origin/master ``` -## List of all the files changed in a commit +## List of all files changed in a commit +```sh +git diff-tree --no-commit-id --name-only -r +``` + +## List of all files till a commit ```sh git ls-tree --name-only -r ``` diff --git a/tips.json b/tips.json index 6dd2470..79cd53c 100644 --- a/tips.json +++ b/tips.json @@ -4,7 +4,11 @@ "tip": "git fetch --all && git reset --hard origin/master" }, { - "title": "List of all the files changed in a commit", + "title": "List of all files changed in a commit", + "tip": "git diff-tree --no-commit-id --name-only -r " + }, + { + "title": "List of all files till a commit", "tip": "git ls-tree --name-only -r " }, {