README.md 729 B

  • both sub-git-dir and git-sub-dir2 are separate git repos each containing a single empty regular file which is commited
  • sub-git-dir was committed before the .gitignore existed
  • sub-git-dir2 is whitelisted in .gitignore

steps to reproduce:

git init
touch a-file
git add a-file
git commit -m 'initial outer'

mkdir sub-git-dir
cd sub-git-dir
touch a-file
git init
git add a-file
git commit -m 'initial inner'
cd ..

git add --all
git commit -m 'add sub-git-dir'

mkdir sub-git-dir2
cd sub-git-dir2
touch a-file
git init
git add a-file
git commit -m 'initial inner'
cd ..

echo '*'              > ./.gitignore
echo '!sub-git-dir2' >> ./.gitignore
git add --all
git commit -m 'add sub-git-dir2'

git push gogs-instance