最近、dotnetnuke Web サイトを git にアップロードしたかったのですが、現在、私の Web サイトには、git でアップロードしたくない画像のギグがあります。
私はGITを検索していて、リポジトリの作成中に作成される.gitignoreファイルに出くわしました.GITにはファイル/フォルダーの無視に関するドキュメントがあり、それは特定のサブフォルダーですが、私の場合はうまくいかないようです.
私のフォルダ構造は次のとおりです。
*******更新しました*******.gitignore
public_html/Portals/_default/
public_html/Portals/0/
public_html/Portals/1/
public_html/Portals/110/
ここで、Portals/_default 以外の Portals の下のすべてのフォルダーを無視したいと考えています。GITの仕様に基づいて試しました:
Example to exclude everything except a specific directory foo/bar (note the /* - without the slash, the wildcard would also exclude everything within foo/bar):
$ cat .gitignore
# exclude everything except directory foo/bar
/*
!/foo
/foo/*
!/foo/bar
以下は私が試したものです:
!/Portals
/Portals/*
!/Portals/_default
しかし、これはまったく機能していないようです。
誰でも私を正しい方向に導くことができますか?