I would like to include the source file (if it was delivered when someone cloned the repository) in my repository, but it was ignored by default.
git update-index --assume-unchanged ... does not work as it only applies to the local index. I want all users to ignore this file by default.
.gitignore does not work, because if I track the file through git add -f .. , then its changes are tracked.
I am trying to achieve what happens if I svn add edited a file, then svn:ignore edited it.
EDIT:
It seems like this is not possible in Git, and I changed the organization of the source file and the assembly based on this old Subversion behavior.
Examples:
$ git clone git@git :gsmith/sandbox.git snip... $ cd sandbox/ $ ls -a . .. .git .gitignore gitignored tracked $ cat .gitignore gitignored $ echo foo >> gitignored $ git status
I would like this file to be ignored.
$ git reset --hard HEAD HEAD is now at 34b1f3d initial setup $ git rm gitignored rm 'gitignored' $ git commit -m "test" [master cd8199d] test 1 files changed, 0 insertions(+), 1 deletions(-) delete mode 100644 gitignored $ git status
Now it is ignored. However, someone who clones the repository will not receive the gitignored content.
source share