これは、DEV パッケージ リポジトリと LIVE パッケージ リポジトリがある GIT v1.7.1 を実行しているライブラリで動作します。リポジトリ自体は、プロジェクトのアセットをパッケージ化するためのシェルに他なりません。すべてのサブモジュール。
LIVE は意図的に更新されることはありませんが、キャッシュ ファイルやアクシデントが発生し、リポジトリが汚れたままになる可能性があります。DEV に追加された新しいサブモジュールも、LIVE 内で初期化する必要があります。
DEV のパッケージ リポジトリ
ここでは、まだ認識していないアップストリームの変更をすべて取得してから、パッケージ リポジトリを更新します。
# Recursively reset to the last HEAD
git submodule foreach --recursive git reset --hard
# Recursively cleanup all files and directories
git submodule foreach --recursive git clean -fd
# Recursively pull the upstream master
git submodule foreach --recursive git pull origin master
# Add / Commit / Push all updates to the package repo
git add .
git commit -m "Updates submodules"
git push
LIVE のパッケージ リポジトリ
ここでは、DEV リポジトリにコミットされた変更を取得しますが、不明なアップストリームの変更は取得しません。
# Pull changes
git pull
# Pull status (this is required for the submodule update to work)
git status
# Initialize / Update
git submodule update --init --recursive