I have a repository with source code (mostly
I initially suggested a solution involving a local modification (updating the index (
git update-index) of
doc/ files in order to not detect any diff)
cd doc git ls-files -z | xargs -0 git update-index --assume-unchanged
But, the OP rightly comments:
--assume-unchanged, the files are not included into a commit either until I undo the change to the index via
Hence, I must assure to call both directly before and after each
I was looking for a solution that is more kind of "permanent". A solution that works for every user who checks out the repository without paying particular attention and that also works within Github.
At the moment I cannot really use the "show history/difference" feature of Github, because Github stops to show the differences after processing a certain number of files and unfortunately it only shows the irrelevant part of changes in the auto-generated documentation but not in the actually important files
Then another option is to isolate all those
doc/ files in their own repo by:
That way (after a git submodule update --init), you can work in your main repo, and generate docs whenever you want: a git diff will only show the diff of the main (parent) repo, not the ones in (the submodule)
But when you push your main repo, you must first add, commit and push in
doc/ (the submodule), before adding, committing and pushing the main repo.
That is because
doc/ is seen by the main repo as a gitlink (a SHA1, special entry in the index), which will change when you commit in
doc/, and which needs to be recorded by the main repo referencing it.