From your diagram, it looks like what you have done is:
- push to the bare (from local)
- and then, from remote, register bare repo, and pull from bare
"From my local root: git push bareserver shop"
Which is:
the set that does not come through are a new group of files that exist on the local branch, but for whatever reason, do not get pushed to the remote branch
Well, did you actually add and then commit those files, before attempting to push your local repo? (see this question for instance)
From the comments, here is how we tracked together the root cause of this issue:
Another way to troubleshoot is to note the SHA1 of the local commit (which contains your files) and the SHA1 of what you are getting on the remote side (after pulling from bare): if it is not the same, that explain the different content, but you can also search that SHA1 (obtained on remote) on the bare repo and on the local repo, to check to which commit that SHA1 (which lacks some files) refers to.
Would that be this number? 591178c18126be127eaa417fa6b3be86c0fce969
If so, I get the same number on remote and local.
A SHA1 is indeed such a number. If it is the same on local and repo, the content must be the same. Try (if you do not have any current modification on remote) a git reset --hard (again, on the remote repo); check first that you have the right branch checkedout in your remote repo)
Side-by-side, the two results from git log:
and side-by-side, the two folders with different files:
if the SHA1 is the same, then the missing directories should not be part of the local commit.
Try to clone your local repo in a second local repo and check if you see the same content in both local repos.
Strange. When I cloned the local repo to another local repo, the files were missing again. I ran the clone command from the correct branch. Ideas why this would be?
This is a side-by-side of the entire processes for cloning and displaying the different results:
Right now, the fact that the directories are missing in a local clone is proof enough that those directories are not part of the local repo commits in the first place. Are those directories empty? (because even if added, they wouldn't be committed)
Yep, they're totally empty.
They're directories that are originally created as empty but required for a WP plugin to be able to write to in order to add things.
Per this SO question I can add a .gitignore
gonna try that. Until this point, in two weeks with git, I've seen this documented nowhere. Seems like a big issue to be communicated so rarely, or am I missing something?
This is actually an important design decision, part of what makes Git a file content management system (see Popularity of Git and Git versus SVN).
Those directories, once added with a .gitignore in them, are now pushed/pulled successfully.