I have one config file on remote server which I won't be tracked on git repo. Usualy hiding/ignoring files with git is super easy. For this problem we can just use:

git update-index --assume-unchanged filename
Example:
#git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add file..." to update what will be committed)
  (use "git checkout -- file..." to discard changes in working directory)

        modified:   app/Config/database.php

no changes added to commit (use "git add" and/or "git commit -a")

# git update-index --assume-unchanged app/Config/database.php

# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Simple and effective :)

More information about git-update-index can be found here https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html