3

I'm quite new to git and trying to learn some of the more advanced ideas and solutions.

The following is a portion of my local repo structure.

Root
|- Dev
|--Components
|- Live
|- Offsite.

This represents a base project where I will be building one instance of a web project in Dev and then compiling it into live. This means that DEV is a highly volatile folder.

Over the last few days I've added and removed many elements from Dev/components using Bower.js

I've been trying to use

git ls-tree Dev/Components

to view the top level tree of that directory to see if I only have the most current elements in that directory. This is returning: fatal: Not a valid object name tree

So, my question is what's the correct call to make?

(Alternatively, is there a better way to compare a snapshot of the current repo with a snapshot of the directory)

4

1 回答 1

2

指定提交,然后是路径 - 例如:git ls-tree HEAD:Dev/Componentsgit ls-tree master~4:Dev/Components

你所追求的是关于在 git 中指定修订的文档。请参阅git rev-parse,其中详细介绍了指定修订或片段的多种方法。

于 2013-06-27T20:59:37.820 回答