Git: ignoring .htaccess… just not always -
here's scenario:
- i want track .htaccess in repo, since contains essential configuration.
- i want keep prying eyes away dev site, add http auth directives .htaccess in dev.
- during development, don't want git tell me .htaccess modified, nor want .htaccess included in
git add -acommand. - i do, however, want option add , commit .htaccess. (if make changes should propagate production.)
what's best way this? advice.
to ignore changes in file, use
git update-index --assume-unchanged .htaccess this command sets flag on file such git treats if there no uncommitted changes file, regardless of contents of file working copy.
you need undo previous before can stage , commit new changes.
git update-index --no-assume-unchanged .htaccess git commit .htaccess
Comments
Post a Comment