he doesn't pull up with git pull from github
the pull command does not "pull up" any files at all. pull - these are two consecutive commands: fetch and checkout .
fetch copies new objects (such as commit , tree , blob ) from the specified repository (for example, from the github.com server) to your local repository. for the sake of truth, it also turns out some meta-information like “where one branch or another points to” (a branch in git is a floating pointer to commit).
checkout unpacks (if necessary) objects from the repository and recreates the file / directory tree - a working copy of your repository.
if after such unpacking in the working copy there is no file, then it means that it is not mentioned in the object of the tree type, to which the object of the commit type refers, for which the checkout command was executed.
if you are sure that a certain file was once in the repository, you can check it with the command:
$ git log -- путь/к/файлу
all commits that have changed this file will be displayed. if nothing is displayed, it means that this file has never been present in the repository (at least with this name - путь/к/файлу ).
if commits are displayed, you can retrieve the contents of this file after any of these commits (but not the most recent one - because by this commit the file was deleted or renamed) with:
$ git checkout хэш-коммита -- путь/к/файлу
getting the content (or creating it from scratch) and editing it if necessary, you can already add this file to the index (the -f option is necessary to ignore the .gitignore content):
$ git add -f путь/к/файлу
and fix this fact with a commit. and no .gitignore content will prevent you from doing this.
and there is no need to rewrite the history of commits on such a trivial matter.
.gitignoreto the repository? So add:git add путь/к/файлу/каталогу. for this to rewrite history is not necessary. - aleksandr barakin