@vaporeon_ a normally created git repository is a directory with a .git subdirectory, the ultimate source of truth about the repository and its history. the actual files that you are working on are part of the “working directory”
actually pushing to a remote only changes the contents of the .git subdirectory; the parent directory (that is, the “working directory”) is not changed to reflect any updates. strictly speaking this is fine, but consider a situation where
since the behavior of the the push opurration will not update the working directory upstream at all, this will create a very unintuitive situation where the history is being stored correctly, but the working directory is not updated. if you can git status
in the remote, it would say the new file has been deleted! (although the change is recorded in .git, the working directory no longer has the file, so this is the conclusion git will come to about the current (unstaged) state of the working directory)
creating “--bare” repository makes the created directory just the .git subdirectory; no working directory is created at all. because git only needs the .git directory to handle server operations, this is fine