git pull retrieves and merges the remote branch.
.gitignore only works locally and will hide the corresponding entries from being displayed on git status and added to the index using git add . This is not what you want.
What you want to do is fetch remote branch, and from this, extract the required file / file.
$ git fetch <remote> <branch> $ git checkout <remote>/<branch> -- relative/path/to/file/or/dir
the / dir file should now be in your branch and added to the index.
c00kiemon5ter
source share