0

プロジェクトを svn から git に移動しました。--index-filter を指定した git-filter-branch を使用して不要なディレクトリをすべて削除し、 --prune-empty オプションを使用して空のコミットをすべて削除しました。

リポジトリを再クローンした後も、先祖ディレクトリを指すパスを持つこれらの奇妙なコミットが表示されます。これは git log --stat の出力で最もよく説明されています

commit 222222b80e791e4ef5b9a027c8b10f64be5e2222
Author: someuser <someuser@somedomain>
Date:   Mon Sep 14 17:52:08 2009

    some commit msg

 hello/.project                                |   11 ++++
 hello/bin/hello.fla                           |  Bin 0 -> 43008 bytes
 .../other/Plugin.as                           |   10 ++++
 .../other/Constants.as                        |    2 +
 hello/Base.as                                 |   52 ++++++++++++++++++++
 .../other/HelloWorld.as                       |   21 ++++++++
 .../target/Hello.swf                          |  Bin 0 -> 1039 bytes
 7 files changed, 96 insertions(+), 0 deletions(-)

これはどのように発生し、どうすれば修正できますか?

ところで、コマンドは git リポジトリのルートで実行されました。

4

1 に答える 1

1

これらは親ディレクトリではありません。git長いパス名を...表示する余地がないため (おそらく) に省略しています。

git log --helpマニュアルページから:

   --stat[=<width>[,<name-width>[,<count>]]]
       Generate a diffstat. You can override the default output width
       for 80-column terminal by --stat=<width>. The width of the
       filename part can be controlled by giving another width to it
       separated by a comma. By giving a third parameter <count>, you
       can limit the output to the first <count> lines, followed by
       ...  if there are more.

       These parameters can also be set individually with
       --stat-width=<width>, --stat-name-width=<name-width> and
       --stat-count=<count>.

端末のサイズを 120 文字幅に変更してから、次のようにします。

git log --stat=120,80

その場合、完全なパス名を表示する十分なスペースが必要です。

于 2012-06-01T21:59:10.173 に答える