#!/bin/sh mkdir sub cd sub echo hello > file git init git add . git commit -m "Initial" cd .. mkdir super cd super echo hello2 > afile echo hello3 > test git init git submodule add $PWD/../sub git add . git commit -m "Initial" echo goodbye > sub/file echo goodbye2 > test git update-index --assume-unchanged sub git diff