Merge pull request #15 from samarpanda/diff-tree

Git diff-tree vs ls-tree
This commit is contained in:
hemanth.hm 2015-07-25 23:02:14 +05:30
commit 9e615c7910
2 changed files with 13 additions and 3 deletions

View File

@ -4,7 +4,8 @@
<!-- @doxie.inject start toc -->
<!-- Dont remove or change the comment above that can break automatic updates. -->
* [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 <commit-ish>
```
## List of all files till a commit
```sh
git ls-tree --name-only -r <commit-ish>
```

View File

@ -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 <commit-ish>"
},
{
"title": "List of all files till a commit",
"tip": "git ls-tree --name-only -r <commit-ish>"
},
{